9
9
10
10
#define SWIFT_EXPORT_FROM (LIBRARY ) __attribute__((__visibility__("default")))
11
11
12
+ #define SWIFT_NONISOLATED_UNSAFE __attribute__((swift_attr("nonisolated(unsafe)")))
13
+
12
14
/// A schedulable unit
13
15
/// Note that this type layout is a part of public ABI, so we expect this field layout won't break in the future versions.
14
16
/// Current implementation refers the `swift-5.5-RELEASE` implementation.
@@ -27,13 +29,13 @@ typedef SWIFT_CC(swift) void (*swift_task_enqueueGlobal_original)(
27
29
Job * _Nonnull job );
28
30
29
31
SWIFT_EXPORT_FROM (swift_Concurrency )
30
- extern void * _Nullable swift_task_enqueueGlobal_hook ;
32
+ extern void * _Nullable swift_task_enqueueGlobal_hook SWIFT_NONISOLATED_UNSAFE ;
31
33
32
34
/// A hook to take over global enqueuing with delay.
33
35
typedef SWIFT_CC (swift ) void (* swift_task_enqueueGlobalWithDelay_original )(
34
36
unsigned long long delay , Job * _Nonnull job );
35
37
SWIFT_EXPORT_FROM (swift_Concurrency )
36
- extern void * _Nullable swift_task_enqueueGlobalWithDelay_hook ;
38
+ extern void * _Nullable swift_task_enqueueGlobalWithDelay_hook SWIFT_NONISOLATED_UNSAFE ;
37
39
38
40
typedef SWIFT_CC (swift ) void (* swift_task_enqueueGlobalWithDeadline_original )(
39
41
long long sec ,
@@ -42,13 +44,13 @@ typedef SWIFT_CC(swift) void (*swift_task_enqueueGlobalWithDeadline_original)(
42
44
long long tnsec ,
43
45
int clock , Job * _Nonnull job );
44
46
SWIFT_EXPORT_FROM (swift_Concurrency )
45
- extern void * _Nullable swift_task_enqueueGlobalWithDeadline_hook ;
47
+ extern void * _Nullable swift_task_enqueueGlobalWithDeadline_hook SWIFT_NONISOLATED_UNSAFE ;
46
48
47
49
/// A hook to take over main executor enqueueing.
48
50
typedef SWIFT_CC (swift ) void (* swift_task_enqueueMainExecutor_original )(
49
51
Job * _Nonnull job );
50
52
SWIFT_EXPORT_FROM (swift_Concurrency )
51
- extern void * _Nullable swift_task_enqueueMainExecutor_hook ;
53
+ extern void * _Nullable swift_task_enqueueMainExecutor_hook SWIFT_NONISOLATED_UNSAFE ;
52
54
53
55
/// A hook to override the entrypoint to the main runloop used to drive the
54
56
/// concurrency runtime and drain the main queue. This function must not return.
@@ -59,13 +61,13 @@ typedef SWIFT_CC(swift) void (*swift_task_asyncMainDrainQueue_original)();
59
61
typedef SWIFT_CC (swift ) void (* swift_task_asyncMainDrainQueue_override )(
60
62
swift_task_asyncMainDrainQueue_original _Nullable original );
61
63
SWIFT_EXPORT_FROM (swift_Concurrency )
62
- extern void * _Nullable swift_task_asyncMainDrainQueue_hook ;
64
+ extern void * _Nullable swift_task_asyncMainDrainQueue_hook SWIFT_NONISOLATED_UNSAFE ;
63
65
64
66
65
67
/// MARK: - thread local storage
66
68
67
69
extern _Thread_local void * _Nullable swjs_thread_local_event_loop ;
68
70
69
- extern _Thread_local void * _Nullable swjs_thread_local_task_executor_worker ;
71
+ extern _Thread_local void * _Nullable swjs_thread_local_task_executor_worker SWIFT_NONISOLATED_UNSAFE ;
70
72
71
73
#endif
0 commit comments