Skip to content

Commit 1e96466

Browse files
authored
Merge pull request #80695 from mikeash/move-priority-escalation-define
[Concurrency] Move SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION to ABI/Task.h.
2 parents cb0e1da + 8fa7643 commit 1e96466

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

include/swift/ABI/Task.h

+11
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@
2929
#include "bitset"
3030
#include "queue" // TODO: remove and replace with our own mpsc
3131

32+
// Does the runtime provide priority escalation support?
33+
#ifndef SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION
34+
#if SWIFT_CONCURRENCY_ENABLE_DISPATCH && \
35+
__has_include(<dispatch/swift_concurrency_private.h>) && __APPLE__ && \
36+
(defined(__arm64__) || defined(__x86_64__))
37+
#define SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION 1
38+
#else
39+
#define SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION 0
40+
#endif
41+
#endif /* SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION */
42+
3243
namespace swift {
3344
class AsyncTask;
3445
class AsyncContext;

include/swift/Runtime/Concurrency.h

-11
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,6 @@
4545
#define SWIFT_CONCURRENCY_ENABLE_DISPATCH 0
4646
#endif
4747

48-
// Does the runtime provide priority escalation support?
49-
#ifndef SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION
50-
#if SWIFT_CONCURRENCY_ENABLE_DISPATCH && \
51-
__has_include(<dispatch/swift_concurrency_private.h>) && __APPLE__ && \
52-
(defined(__arm64__) || defined(__x86_64__))
53-
#define SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION 1
54-
#else
55-
#define SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION 0
56-
#endif
57-
#endif /* SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION */
58-
5948
namespace swift {
6049
class DefaultActor;
6150
class TaskOptionRecord;

0 commit comments

Comments
 (0)