mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-03 04:01:43 +08:00
4b23f9bda3
__libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type of the thread variable instead of void *. * sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise. * include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust __libc_tsd_define arguments. (__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust __libc_tsd_address arguments. Remove union hack. * include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments. * sunrpc/rpc_thread.c (RPC_VARS): Likewise. (__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables): Adjust __libc_tsd_{set,get} arguments. * ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust __libc_tsd_define arguments. * locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get} arguments. * locale/lc-ctype.c (_nl_postload_ctype): Likewise. * locale/global-locale.c (__libc_tsd_LOCALE): Adjust type. (LOCALE): Adjust __libc_tsd_define arguments. * locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get arguments. (LOCALE): Adjust __libc_tsd_define arguments. * sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define arguments. (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} arguments. nptl/ * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define arguments. (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} arguments. 2008-11-07 Jakub Jelinek <jakub@redhat.com> * bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type of the thread variable instead of void *. * sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise. * include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust __libc_tsd_define arguments. (__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust __libc_tsd_address arguments. Remove union hack. * include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments. * sunrpc/rpc_thread.c (RPC_VARS): Likewise. (__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables): Adjust __libc_tsd_{set,get} arguments. * ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust __libc_tsd_define arguments. * locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get} arguments. * locale/lc-ctype.c (_nl_postload_ctype): Likewise. * locale/global-locale.c (__libc_tsd_LOCALE): Adjust type. (LOCALE): Adjust __libc_tsd_define arguments. * locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get arguments. (LOCALE): Adjust __libc_tsd_define arguments. * sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define arguments. (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} arguments.
60 lines
1.8 KiB
C
60 lines
1.8 KiB
C
#ifndef _RPC_RPC_H
|
|
#include <sunrpc/rpc/rpc.h>
|
|
#include <bits/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)
|
|
|
|
#endif /* _RPC_THREAD_SAFE_ */
|
|
|
|
#endif
|