Fix a heap profiling regression.

Add the prof_tctx_state_destroying transitionary state to fix a race
between a thread destroying a tctx and another thread creating a new
equivalent tctx.

This regression was introduced by
602c8e0971 (Implement per thread heap
profiling.).
This commit is contained in:
Jason Evans
2015-03-14 14:01:35 -07:00
parent d6384b09e1
commit 764b00023f
2 changed files with 32 additions and 13 deletions

View File

@@ -81,6 +81,7 @@ struct prof_cnt_s {
typedef enum {
prof_tctx_state_initializing,
prof_tctx_state_nominal,
prof_tctx_state_destroying,
prof_tctx_state_dumping,
prof_tctx_state_purgatory /* Dumper must finish destroying. */
} prof_tctx_state_t;