rpc_private.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. /*
  6. * Multi-threaded support
  7. * Group all global and static variables into a single spot.
  8. * This area is allocated on a per-thread basis
  9. */
  10. #ifdef __UCLIBC_HAS_THREADS__
  11. #include <pthread.h>
  12. #include <bits/libc-lock.h>
  13. struct rpc_thread_variables {
  14. fd_set svc_fdset_s; /* Global, rpc_common.c */
  15. struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */
  16. struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */
  17. int svc_max_pollfd_s; /* Global, rpc_common.c */
  18. void *clnt_perr_buf_s; /* clnt_perr.c */
  19. void *clntraw_private_s; /* clnt_raw.c */
  20. void *callrpc_private_s; /* clnt_simp.c */
  21. void *key_call_private_s; /* key_call.c */
  22. void *authdes_cache_s; /* svcauth_des.c */
  23. void *authdes_lru_s; /* svcauth_des.c */
  24. void *svc_xports_s; /* svc.c */
  25. void *svc_head_s; /* svc.c */
  26. void *svcraw_private_s; /* svc_raw.c */
  27. void *svcsimple_proglst_s; /* svc_simple.c */
  28. void *svcsimple_transp_s; /* svc_simple.c */
  29. };
  30. extern struct rpc_thread_variables *__rpc_thread_variables(void)
  31. __attribute__ ((const)) attribute_hidden;
  32. extern void __rpc_thread_svc_cleanup (void) attribute_hidden;
  33. extern void __rpc_thread_clnt_cleanup (void) attribute_hidden;
  34. /*extern void __rpc_thread_key_cleanup (void) attribute_hidden;*/
  35. extern void __rpc_thread_destroy (void);
  36. #define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
  37. #endif /* __UCLIBC_HAS_THREADS__ */
  38. #endif