]> git.wh0rd.org - patches.git/blob - thread_stack.patch
initial import
[patches.git] / thread_stack.patch
1 --- threads.c.orig 2007-05-16 13:59:44.000000000 +0800
2 +++ threads.c 2007-05-08 16:23:31.000000000 +0800
3 @@ -524,6 +524,8 @@
4 {
5 int i_ret;
6 void *p_data = (void *)p_this;
7 + pthread_attr_t th_attr;
8 + size_t th_size = 0;
9
10 vlc_mutex_lock( &p_this->object_lock );
11
12 @@ -569,7 +571,13 @@
13 i_ret = resume_thread( p_this->thread_id );
14
15 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
16 - i_ret = pthread_create( &p_this->thread_id, NULL, func, p_data );
17 +
18 + pthread_attr_init(&th_attr);
19 + pthread_attr_getstacksize(&th_attr, &th_size);
20 + printf("vlc: default stack size: %d\n", th_size);
21 + th_size = 65536;
22 + pthread_attr_setstacksize(&th_attr, th_size);
23 + i_ret = pthread_create( &p_this->thread_id, &th_attr, func, p_data );
24
25 #ifndef __APPLE__
26 if( config_GetInt( p_this, "rt-priority" ) )