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