diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-11-07 15:07:10 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-11-07 15:07:10 +0000 |
commit | 4b23f9bda30fc4aca1d0e108bab3fdbd63b0ff59 (patch) | |
tree | bf8360059895514a7409ba883f8b658fa62b85bb /sysdeps/mach | |
parent | 486bdb886330a250af76cbb12af55d2c67ec0981 (diff) | |
download | glibc-4b23f9bda30fc4aca1d0e108bab3fdbd63b0ff59.tar.gz |
* 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. 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.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/hurd/bits/libc-tsd.h | 15 | ||||
-rw-r--r-- | sysdeps/mach/hurd/malloc-machine.h | 8 |
2 files changed, 12 insertions, 11 deletions
diff --git a/sysdeps/mach/hurd/bits/libc-tsd.h b/sysdeps/mach/hurd/bits/libc-tsd.h index 56393e930d..926dd1fcc1 100644 --- a/sysdeps/mach/hurd/bits/libc-tsd.h +++ b/sysdeps/mach/hurd/bits/libc-tsd.h @@ -1,5 +1,5 @@ /* libc-internal interface for thread-specific data. Hurd version. - Copyright (C) 1998,2002 Free Software Foundation, Inc. + Copyright (C) 1998,2002,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,13 +22,14 @@ #include <hurd/threadvar.h> -#define __libc_tsd_define(CLASS, KEY) /* nothing, always have threadvars */ +#define __libc_tsd_define(CLASS, TYPE, KEY) /* nothing, always have threadvars */ -#define __libc_tsd_address(KEY) \ - ((void **) __hurd_threadvar_location (_HURD_THREADVAR_##KEY)) - -#define __libc_tsd_get(KEY) (*__libc_tsd_address (KEY)) -#define __libc_tsd_set(KEY, VALUE) (*__libc_tsd_address (KEY) = (VALUE)) +#define __libc_tsd_address(TYPE, KEY) \ + ((TYPE *) __hurd_threadvar_location (_HURD_THREADVAR_##KEY)) +#define __libc_tsd_get(TYPE, KEY) \ + (*__libc_tsd_address (TYPE, KEY)) +#define __libc_tsd_set(TYPE, KEY, VALUE) \ + (*__libc_tsd_address (TYPE, KEY) = (VALUE)) #endif /* bits/libc-tsd.h */ diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h index 70aaf11b87..e6078f60dc 100644 --- a/sysdeps/mach/hurd/malloc-machine.h +++ b/sysdeps/mach/hurd/malloc-machine.h @@ -1,6 +1,6 @@ /* Basic platform-independent macro definitions for mutexes, thread-specific data and parameters for malloc. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -58,10 +58,10 @@ #include <bits/libc-tsd.h> typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */ -__libc_tsd_define (static, MALLOC) /* declaration/common definition */ +__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */ #define tsd_key_create(key, destr) ((void) (key)) -#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data)) -#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC)) +#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data)) +#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC)) #include <sysdeps/generic/malloc-machine.h> |