OSDN Git Service

Fix use of __pthread_once, and fix rpc usage of thread local
authorEric Andersen <andersen@codepoet.org>
Mon, 12 Aug 2002 09:13:58 +0000 (09:13 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 12 Aug 2002 09:13:58 +0000 (09:13 -0000)
storage....
 -Erik

libc/inet/rpc/rpc_thread.c
libc/misc/pthread/weaks.c

index 6c01af9..ba5350e 100644 (file)
@@ -35,12 +35,8 @@ __rpc_thread_destroy (void)
 }
 
 
-#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
@@ -86,12 +82,6 @@ __rpc_thread_variables (void)
        }
        return tvp;
 }
-#else
-struct rpc_thread_variables * __rpc_thread_variables (void)
-{
-    return __libc_tsd_RPC_VARS_data;
-}
-#endif
 
 
 /* Global variables If we're single-threaded, or if this is the first
index e2019d0..eccb922 100644 (file)
@@ -77,6 +77,7 @@ weak_alias (__pthread_return_0, pthread_rwlockattr_init)
 weak_alias (__pthread_return_0, pthread_rwlockattr_destroy)
 weak_alias (__pthread_return_0, pthread_rwlockattr_setpshared)
 weak_alias (__pthread_return_0, pthread_rwlockattr_getpshared)
+weak_alias (__pthread_return_0, __pthread_once)
 
 
 /* Those are pthread functions which return 1 if successful. */