… | |
… | |
45 | #define X_COND_SIGNAL(cond) pthread_cond_signal (&(cond)) |
45 | #define X_COND_SIGNAL(cond) pthread_cond_signal (&(cond)) |
46 | #define X_COND_WAIT(cond,mutex) pthread_cond_wait (&(cond), &(mutex)) |
46 | #define X_COND_WAIT(cond,mutex) pthread_cond_wait (&(cond), &(mutex)) |
47 | #define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to)) |
47 | #define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to)) |
48 | |
48 | |
49 | typedef pthread_t xthread_t; |
49 | typedef pthread_t xthread_t; |
50 | #define X_THREAD_PROC(name) 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 | thread_create (xthread_t *tid, void *(*proc)(void *), void *arg) |
55 | { |
55 | { |