Skip to content

Commit 07c6a06

Browse files
authored
Merge pull request #37412 from mikeash/job-metadata-debug-symbol-5.5
[5.5][Concurrency] Expose Job's metadata as a debug variable
2 parents 19b8928 + bbe8c66 commit 07c6a06

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
@@ -261,6 +261,8 @@ static FullMetadata<DispatchClassMetadata> taskHeapMetadata = {
261261
}
262262
};
263263

264+
const void *const swift::_swift_concurrency_debug_jobMetadata =
265+
static_cast<Metadata *>(&jobHeapMetadata);
264266
const void *const swift::_swift_concurrency_debug_asyncTaskMetadata =
265267
static_cast<Metadata *>(&taskHeapMetadata);
266268

0 commit comments

Comments
 (0)