This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51296] Several 30_threads tests FAIL on Tru64 UNIX
- From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Nov 2011 12:42:17 +0000
- Subject: [Bug libstdc++/51296] Several 30_threads tests FAIL on Tru64 UNIX
- Auto-submitted: auto-generated
- References: <bug-51296-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296
--- Comment #14 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-11-28 12:42:17 UTC ---
> --- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-26 15:18:40 UTC ---
> Does this reduced test work with -std=gnu++11 -pthread ?
Unfortunately not, I still get
22 : Invalid argument
Only if I add an explicit call to pthread_mutex_init does the testcase
work.
I've no real idea why this happens. pthread_mutex_init(3) states
Use the PTHREAD_MUTEX_INITIALIZER macro to statically initialize a mutex
without calling this routine. Statically initialized mutexes need not be
destroyed using pthread_mutex_destroy(3). Use this macro as follows:
pthread_mutex_t mutex= PTHREAD_MUTEX_INITIALIZER
Only normal mutexes can be statically initialized.
While I do have Tru64 UNIX sources, libpthread is only partially
included and the implementation of pthread_mutex_lock is missing.
Rainer