Skip to content

Commit 99d8037

Browse files
Concurrency: fix calling-conv mismatch violation
This is a temporary solution until cdecl can be allowed on function declaration without body.
1 parent fecd9f5 commit 99d8037

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stdlib/public/Concurrency/AsyncStream.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,29 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include "swift/Runtime/Config.h"
1314
#include "swift/Runtime/Mutex.h"
1415

1516
namespace swift {
1617
// return the size in words for the given mutex primitive
17-
extern "C"
18+
extern "C" SWIFT_CC(swift)
1819
size_t _swift_async_stream_lock_size() {
1920
size_t words = sizeof(MutexHandle) / sizeof(void *);
2021
if (words < 1) { return 1; }
2122
return words;
2223
}
2324

24-
extern "C"
25+
extern "C" SWIFT_CC(swift)
2526
void _swift_async_stream_lock_init(MutexHandle &lock) {
2627
MutexPlatformHelper::init(lock);
2728
}
2829

29-
extern "C"
30+
extern "C" SWIFT_CC(swift)
3031
void _swift_async_stream_lock_lock(MutexHandle &lock) {
3132
MutexPlatformHelper::lock(lock);
3233
}
3334

34-
extern "C"
35+
extern "C" SWIFT_CC(swift)
3536
void _swift_async_stream_lock_unlock(MutexHandle &lock) {
3637
MutexPlatformHelper::unlock(lock);
3738
}

0 commit comments

Comments
 (0)