diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-12-08 22:20:41 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-12-08 22:20:41 +0000 |
commit | d3c72c2aff7252db1d3477802ef64270fef79eae (patch) | |
tree | 989b577a514bafcedf5f245d64a6ab798d2205ff /op.h | |
parent | 60c8298a73edc9f7e89dcf60682f3477045fa898 (diff) | |
download | perl-d3c72c2aff7252db1d3477802ef64270fef79eae.tar.gz |
add missing OP_REFCNT_LOCK/UNLOCKs and document it
p4raw-id: //depot/perl@29488
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -520,6 +520,15 @@ struct loop { #define OA_SCALARREF 7 #define OA_OPTIONAL 8 +/* Op_REFCNT is a reference count at the head of each op tree: needed + * since the tree is shared between threads, and between cloned closure + * copies in the same thread. OP_REFCNT_LOCK/UNLOCK is used when modifying + * this count. + * The same mutex is used to protect the refcounts of the reg_trie_data + * and reg_ac_data structures, which are shared between duplicated + * regexes. + */ + #ifdef USE_ITHREADS # define OP_REFCNT_INIT MUTEX_INIT(&PL_op_mutex) # ifdef PERL_CORE |