diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-25 03:21:45 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-25 03:21:45 +0000 |
commit | 82bed25bffff1fde8bbdddae04cf01b3ee23ecbe (patch) | |
tree | 9815e840b54c3cebb6c79099938843438db185fd /libc/inet/rpc/rpc_thread.c | |
parent | 2c9f6cd6e7ddf6b0e680b6bd0b21b53f345ef7c7 (diff) |
Use the TSD macros and get rid of warnings.
Diffstat (limited to 'libc/inet/rpc/rpc_thread.c')
-rw-r--r-- | libc/inet/rpc/rpc_thread.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index 3b6ef7d93..4031b77be 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/libc/inet/rpc/rpc_thread.c @@ -18,11 +18,11 @@ libc_hidden_proto(__rpc_thread_svc_max_pollfd) #ifdef __UCLIBC_HAS_THREADS__ #include <bits/libc-tsd.h> +#include <bits/libc-lock.h> /* Variable used in non-threaded applications or for the first thread. */ 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; +__libc_tsd_define (, RPC_VARS) /* * Task-variable destructor @@ -30,7 +30,7 @@ static struct rpc_thread_variables *__libc_tsd_RPC_VARS_data = void __rpc_thread_destroy (void) { - struct rpc_thread_variables *tvp = __rpc_thread_variables(); + struct rpc_thread_variables *tvp = __libc_tsd_get (RPC_VARS); if (tvp != NULL && tvp != &__libc_tsd_RPC_VARS_mem) { __rpc_thread_svc_cleanup (); @@ -43,6 +43,7 @@ __rpc_thread_destroy (void) free (tvp->authdes_cache_s); free (tvp->authdes_lru_s); free (tvp); + __libc_tsd_set (RPC_VARS, NULL); } } @@ -71,7 +72,7 @@ __rpc_thread_variables (void) if (tvp != NULL) __libc_tsd_set (RPC_VARS, tvp); else - tvp = __libc_tsd_RPC_VARS_data; + tvp = __libc_tsd_RPC_VARS; } } return tvp; |