svn commit: branches/uClibc-nptl/libc/inet/rpc
sjhill at uclibc.org
sjhill at uclibc.org
Sun Feb 5 05:51:21 UTC 2006
Author: sjhill
Date: 2006-02-04 21:51:20 -0800 (Sat, 04 Feb 2006)
New Revision: 13852
Log:
Fix RPC thread key usage.
Modified:
branches/uClibc-nptl/libc/inet/rpc/rpc_thread.c
Changeset:
Modified: branches/uClibc-nptl/libc/inet/rpc/rpc_thread.c
===================================================================
--- branches/uClibc-nptl/libc/inet/rpc/rpc_thread.c 2006-02-05 05:50:11 UTC (rev 13851)
+++ branches/uClibc-nptl/libc/inet/rpc/rpc_thread.c 2006-02-05 05:51:20 UTC (rev 13852)
@@ -11,13 +11,7 @@
/* Variable used in non-threaded applications or for the first thread. */
static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem;
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-static struct rpc_thread_variables *__libc_tsd_RPC_VARS =
- &__libc_tsd_RPC_VARS_mem;
-#else
-static struct rpc_thread_variables *__libc_tsd_RPC_VARS_data =
- &__libc_tsd_RPC_VARS_mem;
-#endif
+__libc_tsd_define (, RPC_VARS)
/*
* Task-variable destructor
@@ -25,7 +19,7 @@
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 ();
@@ -38,6 +32,7 @@
free (tvp->authdes_cache_s);
free (tvp->authdes_lru_s);
free (tvp);
+ __libc_tsd_set (RPC_VARS, NULL);
}
}
@@ -66,11 +61,7 @@
if (tvp != NULL)
__libc_tsd_set (RPC_VARS, tvp);
else
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
tvp = __libc_tsd_RPC_VARS;
-#else
- tvp = __libc_tsd_RPC_VARS_data;
-#endif
}
}
return tvp;
More information about the uClibc-cvs
mailing list