CORBA-omniORB
view release on metacpan or search on metacpan
omnithreads/shared/shared.xs view on Meta::CPAN
/* Return the user_lock structure (if any) associated with a shared SV.
* If create is true, create one if it doesn't exist */
STATIC user_lock *
S_get_userlock(pTHX_ SV* ssv, bool create)
{
MAGIC *mg;
user_lock *ul = NULL;
assert(ssv);
/* XXX redsign the storage of user locks so we dont need a global
* lock to access them ???? DAPM */
ENTER_LOCK;
mg = mg_find(ssv, PERL_MAGIC_ext);
if (mg)
ul = (user_lock*)(mg->mg_ptr);
else if (create) {
dTHXc;
SHARED_CONTEXT;
ul = (user_lock *) PerlMemShared_malloc(sizeof(user_lock));
Zero(ul, 1, user_lock);
( run in 0.589 second using v1.01-cache-2.11-cpan-71847e10f99 )