summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-03-09 08:55:34 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-03-09 08:55:34 +0000
commit4b1075e445fa24d17e89ac217453c53fe0117ada (patch)
treedffb32f0c5d7378dfc7cbcef5f2b86458aaeb606 /libc
parent163da2664a68731432de1fc799f28bdb95669d34 (diff)
Add back sjhill's 14625 commit, correcting the typo that made it fail
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/rpc/rpc_thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c
index 1b3a1e6c0..fb9ddadc3 100644
--- a/libc/inet/rpc/rpc_thread.c
+++ b/libc/inet/rpc/rpc_thread.c
@@ -21,8 +21,7 @@ libc_hidden_proto(__rpc_thread_svc_max_pollfd)
/* 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 +29,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 +42,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 +71,7 @@ __rpc_thread_variables (void)
if (tvp != NULL)
__libc_tsd_set (RPC_VARS, tvp);
else
- tvp = __libc_tsd_RPC_VARS_data;
+ tvp = __libc_tsd_get (RPC_VARS);
}
}
return tvp;