This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Assertion `mutex->__data.__owner
- From: trisha yad <trisha1march at gmail dot com>
- To: libc-help at sourceware dot org, gcc-help at gcc dot gnu dot org, gcc-help at gnu dot org
- Date: Thu, 24 Nov 2011 18:26:44 +0530
- Subject: Assertion `mutex->__data.__owner
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