forked from OSchip/llvm-project
sanitizer_common: make sem_trywait as non-blocking
sem_trywait never blocks. Use REAL instead of COMMON_INTERCEPTOR_BLOCK_REAL. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D105775
This commit is contained in:
parent
fde34d9f89
commit
8bbf2f7a44
|
@ -6463,7 +6463,7 @@ INTERCEPTOR(int, sem_wait, __sanitizer_sem_t *s) {
|
|||
INTERCEPTOR(int, sem_trywait, __sanitizer_sem_t *s) {
|
||||
void *ctx;
|
||||
COMMON_INTERCEPTOR_ENTER(ctx, sem_trywait, s);
|
||||
int res = COMMON_INTERCEPTOR_BLOCK_REAL(sem_trywait)(s);
|
||||
int res = REAL(sem_trywait)(s);
|
||||
if (res == 0) {
|
||||
COMMON_INTERCEPTOR_ACQUIRE(ctx, (uptr)s);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue