Skip to content

Commit 8abf12f

Browse files
author
Julian Lettner
committed
Add swift_task_set_tsan_hooks()
This change will be sequenced: 1. Call this hook from the TSan runtime 2. Remove `dlsym()` lookup from Swift runtime
1 parent 2ccb312 commit 8abf12f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/Concurrency/ThreadSanitizer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,9 @@ void swift::_swift_tsan_release(void *addr) {
5555
tsan_release(addr);
5656
}
5757
}
58+
59+
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(c)
60+
void swift_task_set_tsan_hooks(TSanFunc *acquire, TSanFunc *release) {
61+
tsan_acquire = acquire;
62+
tsan_release = release;
63+
}

0 commit comments

Comments
 (0)