summaryrefslogtreecommitdiff
path: root/REORG.TODO/include/rpc/rpc.h
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
committerZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
commit5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch)
tree4470480d904b65cf14ca524f96f79eca818c3eaf /REORG.TODO/include/rpc/rpc.h
parent199fc19d3aaaf57944ef036e15904febe877fc93 (diff)
downloadglibc-zack/build-layout-experiment.tar.gz
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'REORG.TODO/include/rpc/rpc.h')
-rw-r--r--REORG.TODO/include/rpc/rpc.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/REORG.TODO/include/rpc/rpc.h b/REORG.TODO/include/rpc/rpc.h
new file mode 100644
index 0000000000..60c78968de
--- /dev/null
+++ b/REORG.TODO/include/rpc/rpc.h
@@ -0,0 +1,69 @@
+#ifndef _RPC_RPC_H
+#include <sunrpc/rpc/rpc.h>
+
+# ifndef _ISOMAC
+
+#include <libc-tsd.h>
+
+/* Now define the internal interfaces. */
+extern unsigned long _create_xid (void);
+
+/*
+ * Multi-threaded support
+ * Group all global and static variables into a single spot.
+ * This area is allocated on a per-thread basis
+ */
+#ifdef _RPC_THREAD_SAFE_
+struct rpc_thread_variables {
+ fd_set svc_fdset_s; /* Global, rpc_common.c */
+ struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */
+ struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */
+ int svc_max_pollfd_s; /* Global, rpc_common.c */
+
+ char *clnt_perr_buf_s; /* clnt_perr.c */
+
+ struct clntraw_private_s *clntraw_private_s; /* clnt_raw.c */
+
+ struct callrpc_private_s *callrpc_private_s; /* clnt_simp.c */
+
+ struct key_call_private *key_call_private_s; /* key_call.c */
+
+ struct cache_entry *authdes_cache_s; /* svcauth_des.c */
+ int *authdes_lru_s; /* svcauth_des.c */
+
+ SVCXPRT **svc_xports_s; /* svc.c */
+ struct svc_callout *svc_head_s; /* svc.c */
+
+ struct svcraw_private_s *svcraw_private_s; /* svc_raw.c */
+
+ struct proglst_ *svcsimple_proglst_s; /* svc_simple.c */
+ SVCXPRT *svcsimple_transp_s; /* svc_simple.c */
+};
+
+extern struct rpc_thread_variables *__rpc_thread_variables(void)
+ __attribute__ ((const));
+extern void __rpc_thread_svc_cleanup (void);
+extern void __rpc_thread_clnt_cleanup (void);
+extern void __rpc_thread_key_cleanup (void);
+
+extern void __rpc_thread_destroy (void);
+
+__libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS)
+
+#define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
+
+libc_hidden_proto (__rpc_thread_svc_max_pollfd)
+libc_hidden_proto (__rpc_thread_svc_pollfd)
+libc_hidden_proto (__rpc_thread_svc_fdset)
+libc_hidden_proto (__rpc_thread_createerr)
+
+/* Perform a host name lookup for NAME and return the first IPv4
+ address in *ADDR. Return 0 on success and -1 on error (and set an
+ RPC error). */
+int __libc_rpc_gethostbyname (const char *host, struct sockaddr_in *addr)
+ attribute_hidden;
+
+#endif /* _RPC_THREAD_SAFE_ */
+
+# endif /* !_ISOMAC */
+#endif