This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/51249] semaphore implemetation for linux leaves threads blocked
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Nov 2011 03:07:04 +0000
- Subject: [Bug libgomp/51249] semaphore implemetation for linux leaves threads blocked
- Auto-submitted: auto-generated
- References: <bug-51249-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51249
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-11-21
AssignedTo|unassigned at gcc dot |amodra at gmail dot com
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Alan Modra <amodra at gmail dot com> 2011-11-21 03:07:04 UTC ---
What's more, the mutex implementation has a similar problem.
libgomp/config/linux/mutex.c gomp_mutex_lock_slow uses a value of 2 in the
mutex to flag that threads are waiting on the mutex, similar to sem.c use of -1
in sem. When two or more threads are waiting it is possible to clear the flag,
wake one thread but leave the other blocked forever.