File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1745,7 +1745,7 @@ namespace SpecialPointerAuthDiscriminators {
1745
1745
const uint16_t AsyncContextParent = 0xbda2 ; // = 48546
1746
1746
const uint16_t AsyncContextResume = 0xd707 ; // = 55047
1747
1747
const uint16_t AsyncContextYield = 0xe207 ; // = 57863
1748
- const uint16_t CancellationNotificationFunction = 0xf73 ; // = 3955 (TaskPriority, TaskPriority) -> Void
1748
+ const uint16_t CancellationNotificationFunction = 0x0f08 ; // = 3848
1749
1749
const uint16_t EscalationNotificationFunction = 0x7861 ; // = 30817
1750
1750
const uint16_t AsyncThinNullaryFunction = 0x0f08 ; // = 3848
1751
1751
const uint16_t AsyncFutureFunction = 0x720f ; // = 29199
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ class CancellationNotificationStatusRecord : public TaskStatusRecord {
269
269
// / subsequently used.
270
270
class EscalationNotificationStatusRecord : public TaskStatusRecord {
271
271
public:
272
- using FunctionType = SWIFT_CC(swift) void (JobPriority, JobPriority , SWIFT_CONTEXT void *);
272
+ using FunctionType = SWIFT_CC(swift) void (uint8_t , uint8_t , SWIFT_CONTEXT void *);
273
273
274
274
private:
275
275
FunctionType *__ptrauth_swift_escalation_notification_function Function;
@@ -282,7 +282,10 @@ class EscalationNotificationStatusRecord : public TaskStatusRecord {
282
282
}
283
283
284
284
void run (JobPriority oldPriority, JobPriority newPriority) {
285
- Function (oldPriority, newPriority, Argument);
285
+ Function (
286
+ static_cast <size_t >(oldPriority),
287
+ static_cast <size_t >(newPriority),
288
+ Argument);
286
289
}
287
290
288
291
static bool classof (const TaskStatusRecord *record) {
Original file line number Diff line number Diff line change @@ -1763,7 +1763,8 @@ swift_task_addCancellationHandlerImpl(
1763
1763
void *context) {
1764
1764
void *allocation =
1765
1765
swift_task_alloc (sizeof (CancellationNotificationStatusRecord));
1766
- auto unsigned_handler = swift_auth_code (handler, 3848 );
1766
+ auto unsigned_handler = swift_auth_code_function (handler,
1767
+ SpecialPointerAuthDiscriminators::CancellationNotificationFunction);
1767
1768
auto *record = ::new (allocation)
1768
1769
CancellationNotificationStatusRecord (unsigned_handler, context);
1769
1770
@@ -1816,7 +1817,8 @@ swift_task_addPriorityEscalationHandlerImpl(
1816
1817
void *context) {
1817
1818
void *allocation =
1818
1819
swift_task_alloc (sizeof (EscalationNotificationStatusRecord));
1819
- auto unsigned_handler = swift_auth_code (handler, 3955 );
1820
+ auto unsigned_handler = swift_auth_code_function (handler,
1821
+ SpecialPointerAuthDiscriminators::EscalationNotificationFunction);
1820
1822
auto *record = ::new (allocation)
1821
1823
EscalationNotificationStatusRecord (unsigned_handler, context);
1822
1824
Original file line number Diff line number Diff line change 19
19
// UNSUPPORTED: DARWIN_SIMULATOR=ios
20
20
// UNSUPPORTED: DARWIN_SIMULATOR=tvos
21
21
22
- // rdar://107390341 - Because task escalation tests seem disabled on this platform
23
- // UNSUPPORTED: CPU=arm64e
24
-
25
22
import Darwin
26
23
@preconcurrency import Dispatch
27
24
You can’t perform that action at this time.
0 commit comments