Assertion `mutex->__data.__owner
trisha yad
trisha1march@gmail.com
Thu Nov 24 15:10:00 GMT 2011
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
More information about the Gcc-help
mailing list