Use prof_tdata_cleanup() argument.

Use the argument to prof_tdata_cleanup(), rather than calling
PROF_TCACHE_GET().  This fixes a bug in the NO_TLS case.
This commit is contained in:
Jason Evans 2011-08-08 17:10:07 -07:00
parent 04ca1efe35
commit 41b954ed36

View File

@ -1109,7 +1109,6 @@ prof_tdata_init(void)
prof_tdata->vec = imalloc(sizeof(void *) * prof_bt_max);
if (prof_tdata->vec == NULL) {
ckh_delete(&prof_tdata->bt2cnt);
idalloc(prof_tdata);
return (NULL);
@ -1127,11 +1126,8 @@ prof_tdata_init(void)
static void
prof_tdata_cleanup(void *arg)
{
prof_tdata_t *prof_tdata;
prof_tdata = PROF_TCACHE_GET();
if (prof_tdata != NULL) {
prof_thr_cnt_t *cnt;
prof_tdata_t *prof_tdata = (prof_tdata_t *)arg;
/*
* Delete the hash table. All of its contents can still be
@ -1154,7 +1150,6 @@ prof_tdata_cleanup(void *arg)
idalloc(prof_tdata);
PROF_TCACHE_SET(NULL);
}
}
void
prof_boot0(void)