Skip to content

Commit bae817e

Browse files
committed
rt: Remove rust_task::notify_tasks_wating_to_join
1 parent 342dc21 commit bae817e

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

src/rt/rust_scheduler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ rust_scheduler::reap_dead_tasks(int id) {
137137
task->lock.lock();
138138
// Make sure this task isn't still running somewhere else...
139139
if (task->can_schedule(id)) {
140-
I(this, task->tasks_waiting_to_join.is_empty());
141140
DLOG(this, task,
142141
"deleting unreferenced dead task %s @0x%" PRIxPTR,
143142
task->name, task);

src/rt/rust_task.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ void task_start_wrapper(spawn_args *a)
197197
#endif
198198
} else {
199199
task->lock.lock();
200-
task->notify_tasks_waiting_to_join();
201200
task->lock.unlock();
202201
task->yield(1);
203202
}
@@ -324,7 +323,6 @@ rust_task::conclude_failure() {
324323
unblock();
325324
fail_parent();
326325
failed = true;
327-
notify_tasks_waiting_to_join();
328326
yield(4);
329327
}
330328

@@ -356,19 +354,6 @@ rust_task::unsupervise()
356354
propagate_failure = false;
357355
}
358356

359-
void
360-
rust_task::notify_tasks_waiting_to_join() {
361-
while (tasks_waiting_to_join.is_empty() == false) {
362-
LOG(this, task, "notify_tasks_waiting_to_join: %d",
363-
tasks_waiting_to_join.size());
364-
rust_task *waiting_task = 0;
365-
tasks_waiting_to_join.pop(&waiting_task);
366-
if (waiting_task->blocked() == true) {
367-
waiting_task->wakeup(this);
368-
}
369-
}
370-
}
371-
372357
frame_glue_fns*
373358
rust_task::get_frame_glue_fns(uintptr_t fp) {
374359
fp -= sizeof(uintptr_t);

src/rt/rust_task.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
9999
// that location before waking us up.
100100
uintptr_t* rendezvous_ptr;
101101

102-
// List of tasks waiting for this task to finish.
103-
array_list<rust_task *> tasks_waiting_to_join;
104-
105102
// This flag indicates that a worker is either currently running the task
106103
// or is about to run this task.
107104
int running_on;
@@ -184,9 +181,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
184181
// Disconnect from our supervisor.
185182
void unsupervise();
186183

187-
// Notify tasks waiting for us that we are about to die.
188-
void notify_tasks_waiting_to_join();
189-
190184
frame_glue_fns *get_frame_glue_fns(uintptr_t fp);
191185
rust_crate_cache * get_crate_cache();
192186

0 commit comments

Comments
 (0)