[Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
howarth at nitro dot med.uc.edu
gcc-bugzilla@gcc.gnu.org
Tue Jan 31 03:38:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51906
--- Comment #30 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-01-31 02:25:31 UTC ---
(In reply to comment #29)
> It might be easier if I to get access to a darwin system, which I should have
> in a few days so I can test it myself.
Okay, I was able to get...
#include <pthread.h>
#include <stdio.h>
struct mutex {
pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
};
int main()
{
mutex m;
// return pthread_mutex_trylock(&m.m);
printf(" returned %d\n",pthread_mutex_trylock(&m.m));
}
to compile with "g++-fsf-4.7 -std=c++0x -g -O0 pthread_test.c" on darwin11 and
it outputs "22"
which appears to be...
The pthread_mutex_lock() and pthread_mutex_trylock() functions shall
fail if:
EINVAL The mutex was created with the protocol attribute having the
value PTHREAD_PRIO_PROTECT and the calling thread's priority is
higher than the mutex's current priority ceiling.
More information about the Gcc-bugs
mailing list