summaryrefslogtreecommitdiff
path: root/libc/inet/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r--libc/inet/rpc/rpc_thread.c40
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
*/