Clean up tsd (no functional changes).

This commit is contained in:
Jason Evans 2012-03-30 12:36:52 -07:00
parent 09a0769ba7
commit f2296deb57
2 changed files with 5 additions and 13 deletions

View File

@ -227,7 +227,9 @@ tcache_get(bool create)
* tcache_create() failure is a soft failure
* that doesn't propagate. However, if TLS
* data are freed via free() as in glibc,
* subtle TLS corruption could result.
* subtle corruption could result from setting
* a TLS variable after its backing memory is
* freed.
*/
return (NULL);
}

View File

@ -109,13 +109,8 @@ a_attr bool a_name##_booted = false;
#define malloc_tsd_funcs(a_attr, a_name, a_type, a_initializer, \
a_cleanup) \
/* Initialization/cleanup. */ \
a_attr void \
a_attr bool \
a_name##_tsd_cleanup_wrapper(void *arg) \
{ \
\
} \
bool \
a_name##_tsd_cleanup_pending(void *arg) \
{ \
bool (*cleanup)(void *) = arg; \
\
@ -131,7 +126,7 @@ a_name##_tsd_boot(void) \
\
if (a_cleanup != malloc_tsd_no_cleanup) { \
malloc_tsd_cleanup_register( \
&a_name##_tsd_cleanup_pending, a_cleanup); \
&a_name##_tsd_cleanup_wrapper, a_cleanup); \
} \
a_name##_booted = true; \
return (false); \
@ -157,11 +152,6 @@ a_name##_tsd_set(a_type *val) \
#define malloc_tsd_funcs(a_attr, a_name, a_type, a_initializer, \
a_cleanup) \
/* Initialization/cleanup. */ \
a_attr void \
a_name##_tsd_cleanup_wrapper(void *arg) \
{ \
\
} \
a_attr bool \
a_name##_tsd_boot(void) \
{ \