File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 332332 (pthread_spin_trylock(arg) == 0 )
333333 #define spin_unlock (arg ) pthread_spin_unlock(arg)
334334 #define spin_destroy (arg ) pthread_spin_destroy(arg)
335+ #ifdef __GLIBC__
335336 #define SPIN_INITIALIZER (spin_t )(1 )
337+ #else
338+ #define SPIN_INITIALIZER (spin_t )(0 )
339+ #endif
336340 #endif
337341 #ifndef mutex_t
338342 // mutex
352356 #define thread_t pthread_t
353357 #define thread_cond_t pthread_cond_t
354358 #define thread_create (tid, func, args ) \
355- pthread_create ((tid), NULL, (func), (args))
359+ { \
360+ pthread_attr_t attr; \
361+ pthread_attr_init (&attr); \
362+ pthread_attr_setstacksize (&attr, 2097152 ); \
363+ pthread_create ((tid), &attr, (func), (args)); \
364+ }
356365 #define thread_join (tid, ret ) pthread_join(tid, ret)
357366 #define thread_cancel (tid ) pthread_cancel(tid)
358367 #define thread_exit (code ) pthread_exit(code)
You can’t perform that action at this time.
0 commit comments