1 | #ifndef _RPC_RPC_H |
2 | #include <sunrpc/rpc/rpc.h> |
3 | #include <libc-tsd.h> |
4 | |
5 | /* Now define the internal interfaces. */ |
6 | extern unsigned long _create_xid (void); |
7 | |
8 | /* |
9 | * Multi-threaded support |
10 | * Group all global and static variables into a single spot. |
11 | * This area is allocated on a per-thread basis |
12 | */ |
13 | #ifdef _RPC_THREAD_SAFE_ |
14 | struct rpc_thread_variables { |
15 | fd_set svc_fdset_s; /* Global, rpc_common.c */ |
16 | struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */ |
17 | struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */ |
18 | int svc_max_pollfd_s; /* Global, rpc_common.c */ |
19 | |
20 | char *clnt_perr_buf_s; /* clnt_perr.c */ |
21 | |
22 | struct clntraw_private_s *clntraw_private_s; /* clnt_raw.c */ |
23 | |
24 | struct callrpc_private_s *callrpc_private_s; /* clnt_simp.c */ |
25 | |
26 | struct key_call_private *key_call_private_s; /* key_call.c */ |
27 | |
28 | struct cache_entry *authdes_cache_s; /* svcauth_des.c */ |
29 | int *authdes_lru_s; /* svcauth_des.c */ |
30 | |
31 | SVCXPRT **svc_xports_s; /* svc.c */ |
32 | struct svc_callout *svc_head_s; /* svc.c */ |
33 | |
34 | struct svcraw_private_s *svcraw_private_s; /* svc_raw.c */ |
35 | |
36 | struct proglst_ *svcsimple_proglst_s; /* svc_simple.c */ |
37 | SVCXPRT *svcsimple_transp_s; /* svc_simple.c */ |
38 | }; |
39 | |
40 | extern struct rpc_thread_variables *__rpc_thread_variables(void) |
41 | __attribute__ ((const)); |
42 | extern void __rpc_thread_svc_cleanup (void); |
43 | extern void __rpc_thread_clnt_cleanup (void); |
44 | extern void __rpc_thread_key_cleanup (void); |
45 | |
46 | extern void __rpc_thread_destroy (void); |
47 | |
48 | __libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS) |
49 | |
50 | #define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x) |
51 | |
52 | libc_hidden_proto (__rpc_thread_svc_max_pollfd) |
53 | libc_hidden_proto (__rpc_thread_svc_pollfd) |
54 | libc_hidden_proto (__rpc_thread_svc_fdset) |
55 | libc_hidden_proto (__rpc_thread_createerr) |
56 | |
57 | #endif /* _RPC_THREAD_SAFE_ */ |
58 | |
59 | #endif |
60 | |