Back to index

glibc  2.9
rpc.h
Go to the documentation of this file.
00001 #ifndef _RPC_RPC_H
00002 #include <sunrpc/rpc/rpc.h>
00003 #include <bits/libc-tsd.h>
00004 
00005 /* Now define the internal interfaces.  */
00006 extern unsigned long _create_xid (void);
00007 
00008 /*
00009  * Multi-threaded support
00010  * Group all global and static variables into a single spot.
00011  * This area is allocated on a per-thread basis
00012  */
00013 #ifdef _RPC_THREAD_SAFE_
00014 struct rpc_thread_variables {
00015        fd_set        svc_fdset_s;         /* Global, rpc_common.c */
00016        struct rpc_createerr rpc_createerr_s;     /* Global, rpc_common.c */
00017        struct pollfd *svc_pollfd_s;              /* Global, rpc_common.c */
00018        int           svc_max_pollfd_s;    /* Global, rpc_common.c */
00019 
00020        char          *clnt_perr_buf_s;    /* clnt_perr.c */
00021 
00022        struct clntraw_private_s *clntraw_private_s;     /* clnt_raw.c */
00023 
00024        struct callrpc_private_s *callrpc_private_s;     /* clnt_simp.c */
00025 
00026        struct key_call_private *key_call_private_s;     /* key_call.c */
00027 
00028        struct cache_entry *authdes_cache_s;      /* svcauth_des.c */
00029        int           *authdes_lru_s;             /* svcauth_des.c */
00030 
00031        SVCXPRT              **svc_xports_s;             /* svc.c */
00032        struct svc_callout *svc_head_s;           /* svc.c */
00033 
00034        struct svcraw_private_s *svcraw_private_s;       /* svc_raw.c */
00035 
00036        struct proglst_ *svcsimple_proglst_s;     /* svc_simple.c */
00037        SVCXPRT              *svcsimple_transp_s; /* svc_simple.c */
00038 };
00039 
00040 extern struct rpc_thread_variables *__rpc_thread_variables(void)
00041      __attribute__ ((const));
00042 extern void __rpc_thread_svc_cleanup (void);
00043 extern void __rpc_thread_clnt_cleanup (void);
00044 extern void __rpc_thread_key_cleanup (void);
00045 
00046 extern void __rpc_thread_destroy (void);
00047 
00048 __libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS)
00049 
00050 #define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
00051 
00052 libc_hidden_proto (__rpc_thread_svc_max_pollfd)
00053 libc_hidden_proto (__rpc_thread_svc_pollfd)
00054 libc_hidden_proto (__rpc_thread_svc_fdset)
00055 libc_hidden_proto (__rpc_thread_createerr)
00056 
00057 #endif /* _RPC_THREAD_SAFE_ */
00058 
00059 #endif