1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-10 05:03:06 +03:00

(rpc_default): Remove. (__rpc_thread_destroy): Use __libc_tsd_RPC_VARS_mem instead of rpc_default. (rpc_thread_multi, __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, __rpc_thread_svc_max_pollfd): Likewise.

This commit is contained in:
Ulrich Drepper
2001-05-17 02:00:04 +00:00
parent f010f4a36f
commit d911bbae4a

View File

@@ -9,15 +9,11 @@
#ifdef _RPC_THREAD_SAFE_ #ifdef _RPC_THREAD_SAFE_
/* Variable used in non-threaded applications. */ /* 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_mem;
static struct rpc_thread_variables *__libc_tsd_RPC_VARS_data = static struct rpc_thread_variables *__libc_tsd_RPC_VARS_data =
&__libc_tsd_RPC_VARS_mem; &__libc_tsd_RPC_VARS_mem;
/* This is the variable used for the first thread. */
static struct rpc_thread_variables rpc_default;
/* /*
* Task-variable destructor * Task-variable destructor
*/ */
@@ -26,7 +22,7 @@ __rpc_thread_destroy (void)
{ {
struct rpc_thread_variables *tvp = __rpc_thread_variables(); struct rpc_thread_variables *tvp = __rpc_thread_variables();
if (tvp != NULL && tvp != &rpc_default) { if (tvp != NULL && tvp != &__libc_tsd_RPC_VARS_mem) {
__rpc_thread_svc_cleanup (); __rpc_thread_svc_cleanup ();
__rpc_thread_clnt_cleanup (); __rpc_thread_clnt_cleanup ();
__rpc_thread_key_cleanup (); __rpc_thread_key_cleanup ();
@@ -47,7 +43,7 @@ __rpc_thread_destroy (void)
static void static void
rpc_thread_multi (void) rpc_thread_multi (void)
{ {
__libc_tsd_set (RPC_VARS, &rpc_default); __libc_tsd_set (RPC_VARS, &__libc_tsd_RPC_VARS_mem);
} }
@@ -88,7 +84,7 @@ __rpc_thread_svc_fdset (void)
struct rpc_thread_variables *tvp; struct rpc_thread_variables *tvp;
tvp = __rpc_thread_variables (); tvp = __rpc_thread_variables ();
if (tvp == &rpc_default) if (tvp == &__libc_tsd_RPC_VARS_mem)
return &svc_fdset; return &svc_fdset;
return &tvp->svc_fdset_s; return &tvp->svc_fdset_s;
} }
@@ -99,7 +95,7 @@ __rpc_thread_createerr (void)
struct rpc_thread_variables *tvp; struct rpc_thread_variables *tvp;
tvp = __rpc_thread_variables (); tvp = __rpc_thread_variables ();
if (tvp == &rpc_default) if (tvp == &__libc_tsd_RPC_VARS_mem)
return &rpc_createerr; return &rpc_createerr;
return &tvp->rpc_createerr_s; return &tvp->rpc_createerr_s;
} }
@@ -110,7 +106,7 @@ __rpc_thread_svc_pollfd (void)
struct rpc_thread_variables *tvp; struct rpc_thread_variables *tvp;
tvp = __rpc_thread_variables (); tvp = __rpc_thread_variables ();
if (tvp == &rpc_default) if (tvp == &__libc_tsd_RPC_VARS_mem)
return &svc_pollfd; return &svc_pollfd;
return &tvp->svc_pollfd_s; return &tvp->svc_pollfd_s;
} }
@@ -121,7 +117,7 @@ __rpc_thread_svc_max_pollfd (void)
struct rpc_thread_variables *tvp; struct rpc_thread_variables *tvp;
tvp = __rpc_thread_variables (); tvp = __rpc_thread_variables ();
if (tvp == &rpc_default) if (tvp == &__libc_tsd_RPC_VARS_mem)
return &svc_max_pollfd; return &svc_max_pollfd;
return &tvp->svc_max_pollfd_s; return &tvp->svc_max_pollfd_s;
} }