20
20
#endif
21
21
22
22
#if defined(_POSIX_THREADS) && !defined(SWIFT_STDLIB_SINGLE_THREADED_RUNTIME)
23
+
24
+ // Notes: swift::fatalError is not shared between libswiftCore and libswift_Concurrency
25
+ // and libswift_Concurrency uses swift_Concurrency_fatalError instead.
26
+ #ifndef SWIFT_FATAL_ERROR
27
+ #define SWIFT_FATAL_ERROR swift::fatalError
28
+ #endif
29
+
23
30
#include " swift/Runtime/Mutex.h"
24
31
25
32
#include " swift/Runtime/Debug.h"
@@ -32,8 +39,8 @@ using namespace swift;
32
39
do { \
33
40
int errorcode = PThreadFunction; \
34
41
if (errorcode != 0 ) { \
35
- fatalError (/* flags = */ 0 , " '%s' failed with error '%s'(%d)\n " , \
36
- #PThreadFunction, errorName (errorcode), errorcode); \
42
+ SWIFT_FATAL_ERROR (/* flags = */ 0 , " '%s' failed with error '%s'(%d)\n " , \
43
+ #PThreadFunction, errorName (errorcode), errorcode); \
37
44
} \
38
45
} while (false )
39
46
@@ -44,8 +51,8 @@ using namespace swift;
44
51
return true ; \
45
52
if (returnFalseOnEBUSY && errorcode == EBUSY) \
46
53
return false ; \
47
- fatalError (/* flags = */ 0 , " '%s' failed with error '%s'(%d)\n " , \
48
- #PThreadFunction, errorName (errorcode), errorcode); \
54
+ SWIFT_FATAL_ERROR (/* flags = */ 0 , " '%s' failed with error '%s'(%d)\n " , \
55
+ #PThreadFunction, errorName (errorcode), errorcode); \
49
56
} while (false )
50
57
51
58
static const char *errorName (int errorcode) {
0 commit comments