rpc_private.h 1.7 KB

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