… | |
… | |
49 | typedef pthread_t xthread_t; |
49 | typedef pthread_t xthread_t; |
50 | #define X_THREAD_PROC(name) static void *name (void *thr_arg) |
50 | #define X_THREAD_PROC(name) static void *name (void *thr_arg) |
51 | #define X_THREAD_ATFORK(a,b,c) |
51 | #define X_THREAD_ATFORK(a,b,c) |
52 | |
52 | |
53 | static int |
53 | static int |
54 | thread_create (xthread_t *tid, void *(*proc)(void *), void *arg) |
54 | xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg) |
55 | { |
55 | { |
56 | int retval; |
56 | int retval; |
57 | pthread_attr_t attr; |
57 | pthread_attr_t attr; |
58 | |
58 | |
59 | pthread_attr_init (&attr); |
59 | pthread_attr_init (&attr); |
… | |
… | |
130 | #ifndef X_STACKSIZE |
130 | #ifndef X_STACKSIZE |
131 | # define X_STACKSIZE sizeof (void *) * 4096 |
131 | # define X_STACKSIZE sizeof (void *) * 4096 |
132 | #endif |
132 | #endif |
133 | |
133 | |
134 | static int |
134 | static int |
135 | thread_create (xthread_t *tid, void *(*proc)(void *), void *arg) |
135 | xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg) |
136 | { |
136 | { |
137 | int retval; |
137 | int retval; |
138 | sigset_t fullsigset, oldsigset; |
138 | sigset_t fullsigset, oldsigset; |
139 | pthread_attr_t attr; |
139 | pthread_attr_t attr; |
140 | |
140 | |