public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: trisha yad <trisha1march@gmail.com>
To: libc-help@sourceware.org, gcc-help@gcc.gnu.org, gcc-help@gnu.org
Subject: Assertion `mutex->__data.__owner
Date: Fri, 25 Nov 2011 05:34:00 -0000	[thread overview]
Message-ID: <CAGr+u+z8ec8_35pndhfb+_Zz4ARyNHRj0fxPv4XGORPfKh862Q@mail.gmail.com> (raw)
Message-ID: <20111125053400.sv6kscQKKJbI-F_MtJR9zxqeGsz9RFqqzkFI5iI3Qi4@z> (raw)

Dear All,

Today on my ARM Board one problem hit.
pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion
`mutex->__data.__owner == 0' failed.
This happen in pthread_mutex_lock.c.
May you pls let me know in which all cases it can happen.


int
__pthread_mutex_lock (mutex)
     pthread_mutex_t *mutex;
{
  assert (sizeof (mutex->__size) >= sizeof (mutex->__data));

  unsigned int type = PTHREAD_MUTEX_TYPE (mutex);
  if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
    return __pthread_mutex_lock_full (mutex);

  pid_t id = THREAD_GETMEM (THREAD_SELF, tid);

  if (__builtin_expect (type, PTHREAD_MUTEX_TIMED_NP)
      == PTHREAD_MUTEX_TIMED_NP)
    {
    simple:
      /* Normal mutex.  */
      LLL_MUTEX_LOCK (mutex);
      assert (mutex->__data.__owner ==
0);<-------------------------------------------------Here.
    }
  else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
......

Thanks

             reply	other threads:[~2011-11-24 12:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 15:10 trisha yad [this message]
2011-11-25  5:34 ` trisha yad
2011-11-25  6:02 ` Carlos O'Donell
2011-11-25  6:15   ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGr+u+z8ec8_35pndhfb+_Zz4ARyNHRj0fxPv4XGORPfKh862Q@mail.gmail.com \
    --to=trisha1march@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc-help@gnu.org \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).