Skip to content

Commit bbe8c66

Browse files
committed
[5.5][Concurrency] Expose Job's metadata as a debug variable
(cherry picked from commit e4a1d2b)
1 parent 59958ef commit bbe8c66

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

stdlib/public/Concurrency/Debug.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121

2222
namespace swift {
2323

24+
// Dispatch knows about these symbol names. Don't change them without consulting
25+
// dispatch.
26+
27+
/// The metadata pointer used for job objects.
28+
SWIFT_RUNTIME_STDLIB_SPI
29+
const void *const _swift_concurrency_debug_jobMetadata;
30+
2431
/// The metadata pointer used for async task objects.
2532
SWIFT_RUNTIME_STDLIB_SPI
2633
const void *const _swift_concurrency_debug_asyncTaskMetadata;

stdlib/public/Concurrency/Task.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ static FullMetadata<DispatchClassMetadata> taskHeapMetadata = {
247247
}
248248
};
249249

250+
const void *const swift::_swift_concurrency_debug_jobMetadata =
251+
static_cast<Metadata *>(&jobHeapMetadata);
250252
const void *const swift::_swift_concurrency_debug_asyncTaskMetadata =
251253
static_cast<Metadata *>(&taskHeapMetadata);
252254

0 commit comments

Comments
 (0)