Skip to content

Commit ee98c1c

Browse files
committed
Remove dead code around the Deadline Task Status record from the
compatibility library Radar-Id: rdar://problem/88093007
1 parent d8e5cd9 commit ee98c1c

File tree

3 files changed

+4
-35
lines changed

3 files changed

+4
-35
lines changed

stdlib/toolchain/Compatibility56/CompatibilityOverrideConcurrency.def

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,10 @@ OVERRIDE_TASK_STATUS(task_escalate, JobPriority,
343343
swift::, (AsyncTask *task, JobPriority newPriority),
344344
(task, newPriority))
345345

346-
OVERRIDE_TASK_STATUS(task_getNearestDeadline, NearestTaskDeadline,
346+
/// We need to keep this entry due to ABI requirements but this overrideable
347+
/// function is not used at all so we will change the function definition to
348+
/// return void instead.
349+
OVERRIDE_TASK_STATUS(task_getNearestDeadline, void,
347350
SWIFT_EXPORT_FROM(swift_Concurrency), SWIFT_CC(swift),
348351
swift::, (AsyncTask *task), (task))
349352

stdlib/toolchain/Compatibility56/include/Concurrency/TaskStatus.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,6 @@ class TaskStatusRecord {
7676
void spliceParent(TaskStatusRecord *newParent) { Parent = newParent; }
7777
};
7878

79-
/// A deadline for the task. If this is reached, the task will be
80-
/// automatically cancelled. The deadline can also be queried and used
81-
/// in other ways.
82-
struct TaskDeadline {
83-
// FIXME: I don't really know what this should look like right now.
84-
// It's probably target-specific.
85-
uint64_t Value;
86-
87-
bool operator==(const TaskDeadline &other) const {
88-
return Value == other.Value;
89-
}
90-
bool operator<(const TaskDeadline &other) const {
91-
return Value < other.Value;
92-
}
93-
};
94-
9579
/// A status record which states that a task has one or
9680
/// more active child tasks.
9781
class ChildTaskStatusRecord : public TaskStatusRecord {

stdlib/toolchain/Compatibility56/include/Runtime/Concurrency.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,6 @@ struct AsyncTaskAndContext {
5151
AsyncContext *InitialContext;
5252
};
5353

54-
/// This should have the same representation as an enum like this:
55-
/// enum NearestTaskDeadline {
56-
/// case none
57-
/// case alreadyCancelled
58-
/// case active(TaskDeadline)
59-
/// }
60-
/// TODO: decide what this interface should really be.
61-
struct NearestTaskDeadline {
62-
enum Kind : uint8_t {
63-
None,
64-
AlreadyCancelled,
65-
Active
66-
};
67-
68-
TaskDeadline Value;
69-
Kind ValueKind;
70-
};
71-
7254

7355
/// Caution: not all future-initializing functions actually throw, so
7456
/// this signature may be incorrect.

0 commit comments

Comments
 (0)