File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,18 @@ void swift_task_reportUnexpectedExecutor(
673
673
SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
674
674
JobPriority swift_task_getCurrentThreadPriority (void );
675
675
676
+ #ifdef __APPLE__
677
+ // / A magic symbol whose address is the mask to apply to a frame pointer to
678
+ // / signal that it is an async frame. Do not try to read the actual value of
679
+ // / this global, it will crash.
680
+ // /
681
+ // / On ARM64_32, the address is only 32 bits, and therefore this value covers
682
+ // / the top 32 bits of the in-memory frame pointer. On other 32-bit platforms,
683
+ // / the bit is not used and the address is always 0.
684
+ SWIFT_EXPORT_FROM (swift_Concurrency)
685
+ struct { char c; } swift_async_extendedFramePointerFlags;
686
+ #endif
687
+
676
688
}
677
689
678
690
#pragma clang diagnostic pop
Original file line number Diff line number Diff line change 34
34
#include < dlfcn.h>
35
35
#endif
36
36
37
+ #ifdef __APPLE__
38
+ #if __POINTER_WIDTH__ == 64
39
+ asm (" \n .globl _swift_async_extendedFramePointerFlags" \
40
+ " \n _swift_async_extendedFramePointerFlags = 0x1000000000000000" );
41
+ #elif __ARM64_ARCH_8_32__
42
+ asm (" \n .globl _swift_async_extendedFramePointerFlags" \
43
+ " \n _swift_async_extendedFramePointerFlags = 0x10000000" );
44
+ #else
45
+ asm (" \n .globl _swift_async_extendedFramePointerFlags" \
46
+ " \n _swift_async_extendedFramePointerFlags = 0x0" );
47
+ #endif
48
+ #endif // __APPLE__
49
+
37
50
using namespace swift ;
38
51
using FutureFragment = AsyncTask::FutureFragment;
39
52
using TaskGroup = swift::TaskGroup;
You can’t perform that action at this time.
0 commit comments