diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-08-11 18:53:30 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-08-11 18:53:30 +0000 |
commit | fd19822e4d58682ee95816c9e2f46094e4052edd (patch) | |
tree | 4e664d0b6386bcf9fa9839a8b6bd1ada00ec8061 /libc | |
parent | 44549659536afa8e378fd3612acf6354e71d2117 (diff) |
Ugh. Make uClibc cross compile with gcc 2.95.x and threads. I wonder
if this is serious enough to warrent 0.9.14?
-Erik
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/rpc/rpc_thread.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index 90b0a6a2a..6c01af95c 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/libc/inet/rpc/rpc_thread.c @@ -12,25 +12,6 @@ static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem; static struct rpc_thread_variables *__libc_tsd_RPC_VARS_data = &__libc_tsd_RPC_VARS_mem; -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); -asm (".weak __pthread_once"); - - -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - /* * Task-variable destructor */ @@ -54,8 +35,27 @@ __rpc_thread_destroy (void) } -#if 0 #warning fix multithreaded initialization... +#if 0 +extern int __pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)); +asm (".weak __pthread_once"); + + +# define __libc_once_define(CLASS, NAME) \ + CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT + +/* Call handler iff the first call. */ +#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ + do { \ + if (__pthread_once != NULL) \ + __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ + else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ + INIT_FUNCTION (); \ + (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ + } \ + } while (0) + /* * Initialize RPC multi-threaded operation */ |