diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-03 15:17:39 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-03 15:17:39 +0000 |
commit | fba3b22e783d72569126ff6fe76f3cb6cd1f043b (patch) | |
tree | a06e4145c0f1a902cb2070e0aaa8729cebfe5b6e /perl.h | |
parent | c23142e2edb5ee317dcd6cd29300b6f2196357db (diff) | |
download | perl-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.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 */ |