2020#endif
2121
2222#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+
2330#include " swift/Runtime/Mutex.h"
2431
2532#include " swift/Runtime/Debug.h"
@@ -32,8 +39,8 @@ using namespace swift;
3239 do { \
3340 int errorcode = PThreadFunction; \
3441 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); \
3744 } \
3845 } while (false )
3946
@@ -44,8 +51,8 @@ using namespace swift;
4451 return true ; \
4552 if (returnFalseOnEBUSY && errorcode == EBUSY) \
4653 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); \
4956 } while (false )
5057
5158static const char *errorName (int errorcode) {
0 commit comments