aboutsummaryrefslogtreecommitdiff
path: root/src/internal/libc.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-24 00:51:36 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-24 00:51:36 -0400
commit07e62953c768f9f09485388c22ffaed98d11d676 (patch)
tree5590ab7130d72e33cd5ef3be1659ea18367121e8 /src/internal/libc.c
parentgcc wrapper improvement: leave libgcc dir in the library path (diff)
downloadgrovel-07e62953c768f9f09485388c22ffaed98d11d676.tar.gz
grovel-07e62953c768f9f09485388c22ffaed98d11d676.tar.xz
retry on cas failures in sem_trywait
this seems counter-intuitive since sem_trywait is supposed to just try once, not wait for the semaphore. however, the retry loop is not a wait. instead, it's to handle the case where the value changes due to a simultaneous post or wait from another thread while the semaphore value remains positive. in such a case, it's absolutely wrong for sem_trywait to fail with EAGAIN because the semaphore is not busy.
Diffstat (limited to 'src/internal/libc.c')
0 files changed, 0 insertions, 0 deletions