[TSan][libdispatch] Add interceptors for dispatch_barrier_async_and_wait()

Add interceptors for the barrier variants of the "async and wait"
dispatch API family.
This commit is contained in:
Julian Lettner 2020-08-24 13:56:22 -07:00
parent 557b890ff4
commit fa0a855c73
1 changed files with 6 additions and 0 deletions

View File

@ -235,9 +235,15 @@ SANITIZER_WEAK_IMPORT void dispatch_async_and_wait(
dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block);
SANITIZER_WEAK_IMPORT void dispatch_async_and_wait_f(
dispatch_queue_t queue, void *context, dispatch_function_t work);
SANITIZER_WEAK_IMPORT void dispatch_barrier_async_and_wait(
dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block);
SANITIZER_WEAK_IMPORT void dispatch_barrier_async_and_wait_f(
dispatch_queue_t queue, void *context, dispatch_function_t work);
DISPATCH_INTERCEPT_SYNC_B(dispatch_async_and_wait, false)
DISPATCH_INTERCEPT_SYNC_F(dispatch_async_and_wait_f, false)
DISPATCH_INTERCEPT_SYNC_B(dispatch_barrier_async_and_wait, true)
DISPATCH_INTERCEPT_SYNC_F(dispatch_barrier_async_and_wait_f, true)
#endif