diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-08-18 14:36:56 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-08-18 14:36:56 -0400 |
commit | 4992ace94232a116bdca25481ccc3d6841b83432 (patch) | |
tree | c3a6d861634c2b85ef87d93ec523220261ca7e79 /arch/x86_64/bits/msg.h | |
parent | 2c4b510bae1b2841e6983a5639dd600255898442 (diff) | |
download | musl-4992ace94232a116bdca25481ccc3d6841b83432.tar.gz musl-4992ace94232a116bdca25481ccc3d6841b83432.tar.xz musl-4992ace94232a116bdca25481ccc3d6841b83432.zip |
further simplify and optimize new cond var
the main idea of the changes made is to have waiters wait directly on the "barrier" lock that was used to prevent them from making forward progress too early rather than first waiting on the atomic state value and then attempting to lock the barrier. in addition, adjustments to the mutex waiter count are optimized. previously, each waking waiter decremented the count (unless it was the first) then immediately incremented it again for the next waiter (unless it was the last). this was a roundabout was of achieving the equivalent of incrementing it once for the first waiter and decrementing it once for the last.
Diffstat (limited to 'arch/x86_64/bits/msg.h')
0 files changed, 0 insertions, 0 deletions