File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 19
19
#if defined(_WIN32)
20
20
#define NOMINMAX
21
21
#include < windows.h>
22
+ #elif defined(__wasi__)
23
+
22
24
#else
23
25
#include < dlfcn.h>
24
26
#endif
@@ -27,6 +29,13 @@ namespace {
27
29
using TSanFunc = void (void *);
28
30
TSanFunc *tsan_acquire, *tsan_release;
29
31
32
+ #if defined(__wasi__)
33
+
34
+ swift::swift_once_t initOnceToken;
35
+ void initializeThreadSanitizer (void *unused) {}
36
+
37
+ #else
38
+
30
39
TSanFunc *loadSymbol (const char *name) {
31
40
#if defined(_WIN32)
32
41
return (TSanFunc *)GetProcAddress (GetModuleHandle (NULL ), name);
@@ -40,6 +49,7 @@ void initializeThreadSanitizer(void *unused) {
40
49
tsan_acquire = loadSymbol (" __tsan_acquire" );
41
50
tsan_release = loadSymbol (" __tsan_release" );
42
51
}
52
+ #endif
43
53
} // anonymous namespace
44
54
45
55
void swift::_swift_tsan_acquire (void *addr) {
You can’t perform that action at this time.
0 commit comments