This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jan 2012 02:25:31 +0000
- Subject: [Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
- Auto-submitted: auto-generated
- References: <bug-51906-4@http.gcc.gnu.org/bugzilla/>
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.