summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-01-19 22:17:07 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-01-19 22:17:07 +0000
commit68795e9367de98482c4a5830e6e94b51bd60f4e3 (patch)
treece6632db4435b22ae2f82e511a34f76563752e4a /sv.h
parent92110913508b9944d111285d9488f2f7b604919c (diff)
downloadperl-68795e9367de98482c4a5830e6e94b51bd60f4e3.tar.gz
Nearly-working threads re-structuring. Do not integrate,
submit-ing to get to Win32, and as "off site" backup. p4raw-id: //depot/perlio@14352
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index 7c07988518..8414124add 100644
--- a/sv.h
+++ b/sv.h
@@ -1167,6 +1167,18 @@ Like C<SvSetSV>, but does any set magic required afterwards.
=for apidoc Am|void|SvSetMagicSV_nosteal|SV* dsv|SV* ssv
Like C<SvSetMagicSV>, but does any set magic required afterwards.
+=for apidoc Am|void|SvSHARE|SV* sv
+Arranges for sv to be shared between threads if a suitable module
+has been loaded.
+
+=for apidoc Am|void|SvLOCK|SV* sv
+Arranges for a mutual exclusion lock to be obtained on sv if a suitable module
+has been loaded.
+
+=for apidoc Am|void|SvUNLOCK|SV* sv
+Releases a mutual exclusion lock on sv if a suitable module
+has been loaded.
+
=head1 SV Manipulation Functions
=for apidoc Am|char *|SvGROW|SV* sv|STRLEN len
@@ -1178,6 +1190,10 @@ Returns a pointer to the character buffer.
=cut
*/
+#define SvSHARE(sv) CALL_FPTR(PL_sharehook)(aTHX_ sv)
+#define SvLOCK(sv) CALL_FPTR(PL_lockhook)(aTHX_ sv)
+#define SvUNLOCK(sv) CALL_FPTR(PL_unlockhook)(aTHX_ sv)
+
#define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
#define SvSETMAGIC(x) STMT_START { if (SvSMAGICAL(x)) mg_set(x); } STMT_END