[tsan] Synchronize leaving a GCD group with notifications

In the patch that introduced support for GCD barrier blocks, I removed releasing a group when leaving it (in dispatch_group_leave). However, this is necessary to synchronize leaving a group and a notification callback (dispatch_group_notify). Adding this back, simplifying dispatch_group_notify_f and adding a test case.

Differential Revision: http://reviews.llvm.org/D21927



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274549 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed