summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-03 15:17:39 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-03 15:17:39 +0000
commitfba3b22e783d72569126ff6fe76f3cb6cd1f043b (patch)
treea06e4145c0f1a902cb2070e0aaa8729cebfe5b6e /perl.h
parentc23142e2edb5ee317dcd6cd29300b6f2196357db (diff)
downloadperl-fba3b22e783d72569126ff6fe76f3cb6cd1f043b.tar.gz
Fixed sv_mutex locking for new_SV, del_SV and nice_chunks.
p4raw-id: //depot/perl@103
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 824f76aeb3..60b0e17313 100644
--- a/perl.h
+++ b/perl.h
@@ -2278,5 +2278,18 @@ EXT bool numeric_local INIT(TRUE); /* Assume local numerics */
#define printf PerlIO_stdoutf
#endif
+/*
+ * nice_chunk and nice_chunk size need to be set
+ * and queried under the protection of sv_mutex
+ */
+#define offer_nice_chunk(chunk, chunk_size) do { \
+ MUTEX_LOCK(&sv_mutex); \
+ if (!nice_chunk) { \
+ nice_chunk = (char*)(chunk); \
+ nice_chunk_size = (chunk_size); \
+ } \
+ MUTEX_UNLOCK(&sv_mutex); \
+ } while (0)
+
#endif /* Include guard */