[PATCH] D25835: [tsan] Add support for GCD target queues
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 11:24:13 PDT 2016
kubabrecka created this revision.
kubabrecka added a reviewer: dvyukov.
kubabrecka added subscribers: llvm-commits, zaks.anna.
kubabrecka set the repository for this revision to rL LLVM.
kubabrecka added a project: Sanitizers.
GCD (libdispatch) has a concept of “target queues”: Each queue has either an implicit or explicit target queue, where the task is handed over to when it’s time to execute it. For example, a concurrent queue can have a serial target queue (effectively making the first queue serial), or multiple queues can have the same serial target queue (which means tasks in all the queues are mutually excluded). Thus we need to acquire-release semantics on the full “chain” of target queues.
This patch changes the way we Acquire() and Release() when executing tasks in queues. Now we’ll walk the chain of target queues and synchronize on each queue that is serial (or when dealing with a barrier block). This should avoid false positives when using dispatch_set_target_queue().
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4884 bytes
Desc: not available
More information about the llvm-commits