rpc_private.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _RPC_PRIVATE_H
  2. #define _RPC_PRIVATE_H
  3. #include <rpc/rpc.h>
  4. /* Now define the internal interfaces. */
  5. extern u_long _create_xid (void) attribute_hidden;
  6. /*
  7. * Multi-threaded support
  8. * Group all global and static variables into a single spot.
  9. * This area is allocated on a per-thread basis
  10. */
  11. #ifdef __UCLIBC_HAS_THREADS__
  12. #include <pthread.h>
  13. #include <bits/libc-lock.h>
  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. void *clnt_perr_buf_s; /* clnt_perr.c */
  20. void *clntraw_private_s; /* clnt_raw.c */
  21. void *callrpc_private_s; /* clnt_simp.c */
  22. void *key_call_private_s; /* key_call.c */
  23. void *authdes_cache_s; /* svcauth_des.c */
  24. void *authdes_lru_s; /* svcauth_des.c */
  25. void *svc_xports_s; /* svc.c */
  26. void *svc_head_s; /* svc.c */
  27. void *svcraw_private_s; /* svc_raw.c */
  28. void *svcsimple_proglst_s; /* svc_simple.c */
  29. void *svcsimple_transp_s; /* svc_simple.c */
  30. };
  31. extern struct rpc_thread_variables *__rpc_thread_variables(void)
  32. __attribute__ ((const)) attribute_hidden;
  33. extern void __rpc_thread_svc_cleanup (void) attribute_hidden;
  34. extern void __rpc_thread_clnt_cleanup (void) attribute_hidden;
  35. /*extern void __rpc_thread_key_cleanup (void) attribute_hidden;*/
  36. extern void __rpc_thread_destroy (void);
  37. #define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
  38. #endif /* __UCLIBC_HAS_THREADS__ */
  39. #endif