… | |
… | |
111 | |
111 | |
112 | typedef pthread_t thread_t; |
112 | typedef pthread_t thread_t; |
113 | #define X_THREAD_PROC(name) static void *name (void *thr_arg) |
113 | #define X_THREAD_PROC(name) static void *name (void *thr_arg) |
114 | #define X_THREAD_ATFORK(prepare,parent,child) pthread_atfork (prepare, parent, child) |
114 | #define X_THREAD_ATFORK(prepare,parent,child) pthread_atfork (prepare, parent, child) |
115 | |
115 | |
|
|
116 | // the broken bsd's once more |
|
|
117 | #ifndef PTHREAD_STACK_MIN |
|
|
118 | # define PTHREAD_STACK_MIN 0 |
|
|
119 | #endif |
|
|
120 | |
116 | static int |
121 | static int |
117 | thread_create (thread_t *tid, void *(*proc)(void *), void *arg) |
122 | thread_create (thread_t *tid, void *(*proc)(void *), void *arg) |
118 | { |
123 | { |
119 | int retval; |
124 | int retval; |
120 | sigset_t fullsigset, oldsigset; |
125 | sigset_t fullsigset, oldsigset; |