summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2006-12-08 22:20:41 +0000
committerDave Mitchell <davem@fdisolutions.com>2006-12-08 22:20:41 +0000
commitd3c72c2aff7252db1d3477802ef64270fef79eae (patch)
tree989b577a514bafcedf5f245d64a6ab798d2205ff /op.h
parent60c8298a73edc9f7e89dcf60682f3477045fa898 (diff)
downloadperl-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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/op.h b/op.h
index 7001be15b5..e3596b5b4d 100644
--- a/op.h
+++ b/op.h
@@ -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