Skip to content

Commit e35eba0

Browse files
committed
Remove old addChild and detachChild stuff from files
Radar-Id: rdar://problem/86347801
1 parent 1947102 commit e35eba0

File tree

4 files changed

+0
-51
lines changed

4 files changed

+0
-51
lines changed

include/swift/Runtime/Concurrency.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -475,18 +475,6 @@ bool swift_taskGroup_hasTaskGroupRecord();
475475
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
476476
bool swift_task_hasTaskGroupStatusRecord();
477477

478-
/// Attach a child task to its parent task and return the newly created
479-
/// `ChildTaskStatusRecord`.
480-
///
481-
/// The record must be removed with by the parent invoking
482-
/// `swift_task_detachChild` when the child has completed.
483-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
484-
ChildTaskStatusRecord* swift_task_attachChild(AsyncTask *child);
485-
486-
/// Remove a child task from the parent tracking it.
487-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
488-
void swift_task_detachChild(ChildTaskStatusRecord *record);
489-
490478
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
491479
size_t swift_task_getJobFlags(AsyncTask* task);
492480

stdlib/public/CompatibilityOverride/CompatibilityOverrideConcurrency.def

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,6 @@ OVERRIDE_TASK_STATUS(task_hasTaskGroupStatusRecord, bool,
312312
SWIFT_EXPORT_FROM(swift_Concurrency), SWIFT_CC(swift),
313313
swift::, , )
314314

315-
OVERRIDE_TASK_STATUS(task_attachChild, ChildTaskStatusRecord *,
316-
SWIFT_EXPORT_FROM(swift_Concurrency), SWIFT_CC(swift),
317-
swift::, (AsyncTask *child), (child))
318-
319-
OVERRIDE_TASK_STATUS(task_detachChild, void,
320-
SWIFT_EXPORT_FROM(swift_Concurrency), SWIFT_CC(swift),
321-
swift::, (ChildTaskStatusRecord *record), (record))
322-
323315
OVERRIDE_TASK_STATUS(task_cancel, void, SWIFT_EXPORT_FROM(swift_Concurrency),
324316
SWIFT_CC(swift), swift::, (AsyncTask *task), (task))
325317

stdlib/public/Concurrency/TaskStatus.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -380,29 +380,6 @@ static bool swift_task_hasTaskGroupStatusRecordImpl() {
380380
/**************************************************************************/
381381

382382
// ==== Child tasks ------------------------------------------------------------
383-
SWIFT_CC(swift)
384-
static ChildTaskStatusRecord*
385-
swift_task_attachChildImpl(AsyncTask *child) {
386-
void *allocation = malloc(sizeof(swift::ChildTaskStatusRecord));
387-
auto record = new (allocation) swift::ChildTaskStatusRecord(child);
388-
SWIFT_TASK_DEBUG_LOG("attach child task = %p, record = %p, to current task = %p",
389-
child, record, swift_task_getCurrent());
390-
391-
bool added_record = swift_task_addStatusRecordWithChecks(
392-
record, [&](ActiveTaskStatus parentStatus) {
393-
swift_task_updateNewChildWithParentAndGroupState(child, parentStatus,
394-
NULL);
395-
return true;
396-
});
397-
assert(added_record);
398-
return record;
399-
}
400-
401-
SWIFT_CC(swift)
402-
static void
403-
swift_task_detachChildImpl(ChildTaskStatusRecord *record) {
404-
swift_task_removeStatusRecord(record);
405-
}
406383

407384
/// Called in the path of linking a child into a parent/group synchronously with
408385
/// the parent task.

unittests/runtime/CompatibilityOverrideConcurrency.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,6 @@ TEST_F(CompatibilityOverrideConcurrencyTest, task_hasTaskGroupStatusRecord) {
231231
swift_task_hasTaskGroupStatusRecord();
232232
}
233233

234-
TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_attachChild) {
235-
swift_task_attachChild(nullptr);
236-
}
237-
238-
TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_detachChild) {
239-
swift_task_detachChild(nullptr);
240-
}
241-
242234
TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_cancel) {
243235
swift_task_cancel(nullptr);
244236
}

0 commit comments

Comments
 (0)