Make tsd cleanup functions optional, remove noop cleanup functions.

This commit is contained in:
Jason Evans 2016-06-02 11:11:35 -07:00
parent e28b43a739
commit 7be2ebc23f
11 changed files with 23 additions and 81 deletions

View file

@ -77,9 +77,14 @@ tsd_cleanup(void *arg)
/* Do nothing. */
break;
case tsd_state_nominal:
#define O(n, t) \
#define MALLOC_TSD_cleanup_yes(n, t) \
n##_cleanup(tsd);
#define MALLOC_TSD_cleanup_no(n, t)
#define O(n, t, c) \
MALLOC_TSD_cleanup_##c(n, t)
MALLOC_TSD
#undef MALLOC_TSD_cleanup_yes
#undef MALLOC_TSD_cleanup_no
#undef O
tsd->state = tsd_state_purgatory;
tsd_set(tsd);