#include "perl.h"
#include "XSUB.h"
+#ifdef USE_ITHREADS
+
#define SHAREDSvPTR(a) ((a)->sv)
/*
int
sharedsv_scalar_mg_clear(pTHX_ SV *sv, MAGIC *mg)
{
- shared_sv *shared = (shared_sv *) mg->mg_ptr;
return 0;
}
sharedsv_elem_mg_STORE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
- bool allowed;
shared_sv *shared = SV_to_sharedsv(aTHX_ mg->mg_obj);
shared_sv *target;
SV **svp;
{
dTHXc;
shared_sv *shared = SV_to_sharedsv(aTHX_ mg->mg_obj);
- SV* ssv;
ENTER_LOCK;
sharedsv_elem_mg_FETCH(aTHX_ sv, mg);
if (SvTYPE(SHAREDSvPTR(shared)) == SVt_PVAV) {
PL_sharehook = &Perl_sharedsv_share;
}
+#endif /* USE_ITHREADS */
+
MODULE = threads::shared PACKAGE = threads::shared::tie
PROTOTYPES: DISABLE
+#ifdef USE_ITHREADS
void
PUSH(shared_sv *shared, ...)
croak("cond_broadcast can only be used on shared values");
COND_BROADCAST(&shared->user_cond);
+#endif /* USE_ITHREADS */
+
BOOT:
{
+#ifdef USE_ITHREADS
Perl_sharedsv_init(aTHX);
+#endif /* USE_ITHREADS */
}
+
+
+