http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51249

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |rth at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-21 
14:52:58 UTC ---
Can you please clarify why do you think mutex is problematic too?
When you do futex_wake in gomp_mutex_unlock_slow, you wake up one of the
threads that are already blocked (i.e. have called futex_wait in
gomp_mutex_lock_slow).
But once it calls futex_wait, it breaks the first loop and keeps setting the
mutex value to 2 rather than just 1.

As for gomp_sem_{wait,post}, I guess libgomp's sem.[ch] has been written based
on glibc before
http://sources.redhat.com/git/?p=glibc.git;a=patch;h=3d2dd6ca71fa9933e3413625d606f4b486661409
changes (we always want private in libgomp, so those parts are non-issue, but
the nwaiters maybe is).  I'll need to think about this more when I'm not so
sleepy.

Reply via email to