in reply to Re: PL_malloc_mutex in XS
in thread PL_malloc_mutex in XS

As far as I know, it is mutex, that is used in perl memory allocator.
Of course, I want give a pointer on it to function pthread_mutex_trylock(), but this code doesn't work too:

13 if (pthread_mutex_trylock(&PL_malloc_mutex) == EBUSY) {

Timeout.xs: In function ‘XS_Timeout_try_get_mutex’:
Timeout.xs:13:30: error: ‘PL_malloc_mutex’ undeclared (first use in this function)
Timeout.xs:13:30: note: each undeclared identifier is reported only once for each function it appears in

Replies are listed 'Best First'.
Re^3: PL_malloc_mutex in XS
by syphilis (Archbishop) on Jul 15, 2014 at 11:34 UTC
    Hmmm ... yes, not a very intelligent suggestion on my part.

    Cheers,
    Rob