Add basic reentrancy-checking support, and allow arena_new to reenter.
This checks whether or not we're reentrant using thread-local data, and, if we are, moves certain internal allocations to use arena 0 (which should be properly initialized after bootstrapping). The immediate thing this allows is spinning up threads in arena_new, which will enable spinning up background threads there.
This commit is contained in:
committed by
David Goldblatt
parent
0a0fcd3e6a
commit
b407a65401
@@ -65,7 +65,8 @@ struct tsd_init_head_s {
|
||||
O(witnesses, witness_list_t, no, no, yes) \
|
||||
O(rtree_leaf_elm_witnesses, rtree_leaf_elm_witness_tsd_t, \
|
||||
no, no, no) \
|
||||
O(witness_fork, bool, yes, no, no)
|
||||
O(witness_fork, bool, yes, no, no) \
|
||||
O(reentrancy_level, int, no, no, no)
|
||||
|
||||
#define TSD_INITIALIZER { \
|
||||
tsd_state_uninitialized, \
|
||||
@@ -82,7 +83,8 @@ struct tsd_init_head_s {
|
||||
TCACHE_ZERO_INITIALIZER, \
|
||||
ql_head_initializer(witnesses), \
|
||||
RTREE_ELM_WITNESS_TSD_INITIALIZER, \
|
||||
false \
|
||||
false, \
|
||||
0 \
|
||||
}
|
||||
|
||||
struct tsd_s {
|
||||
|
||||
Reference in New Issue
Block a user