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