Typing "dist://perl" into the PerlMonks Search box (top of this page) takes you to perl. You can select release 10.0 from a drop-down there and Goto that version and then use "Other tools" to grep the source or "browse".

Line 199 is the first line of:

void recursive_lock_release(pTHX_ recursive_lock_t *lock) { MUTEX_LOCK(&lock->mutex); if (lock->owner == aTHX) { if (--lock->locks == 0) { lock->owner = NULL; COND_SIGNAL(&lock->cond); } } MUTEX_UNLOCK(&lock->mutex); }

from http://cpansearch.perl.org/src/RGARCIA/perl-5.10.0/ext/threads/shared/shared.xs.

http://cpansearch.perl.org/src/RGARCIA/perl-5.10.0/thread.h contains:

# define MUTEX_LOCK(m) \ STMT_START { \ int _eC_; \ if ((_eC_ = pthread_mutex_lock((m)))) \ Perl_croak_nocontext("panic: MUTEX_LOCK (%d) [%s:%d]", \ _eC_, __FILE__, __LINE__); \ } STMT_END

So 22 is "eC" (error code, I'd guess). A $! of 22 is "Invalid argument" for a random Linux box I checked. You should be able to grep for pthread_mutex_lock to dig deeper, etc.

I hope that helps.

- tye        


In reply to Re: panic: MUTEX_LOCK (22) - what should I look for? (tools) by tye
in thread panic: MUTEX_LOCK (22) - what should I look for? by Wiggins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.