mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-11 15:50:06 +00:00
543cf8a9e1
Add changes which were in this form in the original patch by Eric Norum <eric.norum@usask.ca>. * include/rpc/rpc.h: Remove svc_fdset, rpc_createerr, svc_pollfd, and svc_max_pollfd. * sunrpc/rpc/rpc.h: Declare __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. Define svc_fdset, get_rpc_createerr, svc_pollfd, and svc_max_pollfd. * sunrpc/rpc_thread.c: Handle first thread special, it uses the global variables. Define __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. * sunrpc/Versions [libc] (GLIBC_2.2.3): Export __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. * sunrpc/clnt_gen.c: Replace use of rpc_createerr by call to get_rpc_createerr. * sunrpc/clnt_perr.c: Likewise. * sunrpc/clnt_simp.c: Likewise. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/pm_getport.c: Likewise.
54 lines
1.4 KiB
C
54 lines
1.4 KiB
C
#ifndef _RPC_RPC_H
|
|
#include <sunrpc/rpc/rpc.h>
|
|
|
|
/* Now define the internal interfaces. */
|
|
extern unsigned long _create_xid (void);
|
|
|
|
/*
|
|
* Multi-threaded support
|
|
* Group all global and static variables into a single spot.
|
|
* This area is allocated on a per-thread basis
|
|
*/
|
|
#ifdef _RPC_THREAD_SAFE_
|
|
struct rpc_thread_variables {
|
|
fd_set svc_fdset_s; /* Global, rpc_common.c */
|
|
struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */
|
|
struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */
|
|
int svc_max_pollfd_s; /* Global, rpc_common.c */
|
|
|
|
void *authnone_private_s; /* auth_none.c */
|
|
|
|
void *clnt_perr_buf_s; /* clnt_perr.c */
|
|
|
|
void *clntraw_private_s; /* clnt_raw.c */
|
|
|
|
void *callrpc_private_s; /* clnt_simp.c */
|
|
|
|
void *key_call_private_s; /* key_call.c */
|
|
|
|
void *authdes_cache_s; /* svcauth_des.c */
|
|
void *authdes_lru_s; /* svcauth_des.c */
|
|
|
|
void *svc_xports_s; /* svc.c */
|
|
void *svc_head_s; /* svc.c */
|
|
|
|
void *svcraw_private_s; /* svc_raw.c */
|
|
|
|
void *svcsimple_proglst_s; /* svc_simple.c */
|
|
void *svcsimple_transp_s; /* svc_simple.c */
|
|
};
|
|
|
|
extern struct rpc_thread_variables *__rpc_thread_variables(void)
|
|
__attribute__ ((const));
|
|
extern void __rpc_thread_svc_cleanup (void);
|
|
extern void __rpc_thread_clnt_cleanup (void);
|
|
extern void __rpc_thread_key_cleanup (void);
|
|
|
|
extern void __rpc_thread_destroy (void);
|
|
|
|
#define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
|
|
|
|
#endif /* _RPC_THREAD_SAFE_ */
|
|
|
|
#endif
|