Skip to content

Commit 5eb2881

Browse files
committed
---
yaml --- r: 10987 b: refs/heads/master c: 3978fbf h: refs/heads/master i: 10985: f19f715 10983: b59505a v: v3
1 parent 530137c commit 5eb2881

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ed3a5ad5ad01a7213cecb6361b83d710f8eb4249
2+
refs/heads/master: 3978fbff8b79d53de57d48473bde43aa533369fd
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rt/rust_scheduler.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,10 @@ rust_scheduler::reap_dead_tasks(int id) {
135135
for (size_t i = 0; i < dead_tasks_len; ++i) {
136136
rust_task *task = dead_tasks_copy[i];
137137
task->lock.lock();
138-
// Make sure this task isn't still running somewhere else...
139-
if (task->can_schedule(id)) {
140-
DLOG(this, task,
141-
"deleting unreferenced dead task %s @0x%" PRIxPTR,
142-
task->name, task);
143-
task->lock.unlock();
144-
} else {
145-
task->lock.unlock();
146-
dead_tasks_copy[i] = NULL;
147-
}
138+
DLOG(this, task,
139+
"deleting unreferenced dead task %s @0x%" PRIxPTR,
140+
task->name, task);
141+
task->lock.unlock();
148142
}
149143

150144
// Now grab the lock again and remove the tasks that were truly dead
@@ -192,9 +186,7 @@ rust_scheduler::schedule_task(int id) {
192186
// Look around for a runnable task, starting at k.
193187
for(size_t j = 0; j < running_tasks.length(); ++j) {
194188
size_t i = (j + k) % running_tasks.length();
195-
if (running_tasks[i]->can_schedule(id)) {
196-
return (rust_task *)running_tasks[i];
197-
}
189+
return (rust_task *)running_tasks[i];
198190
}
199191
}
200192
return NULL;

trunk/src/rt/rust_task.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,6 @@ rust_task::backtrace() {
623623
#endif
624624
}
625625

626-
bool rust_task::can_schedule(int id)
627-
{
628-
return true;
629-
}
630-
631626
void *
632627
rust_task::calloc(size_t size, const char *tag) {
633628
return local_region.calloc(size, tag);

trunk/src/rt/rust_task.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
171171
frame_glue_fns *get_frame_glue_fns(uintptr_t fp);
172172
rust_crate_cache * get_crate_cache();
173173

174-
bool can_schedule(int worker);
175-
176174
void *calloc(size_t size, const char *tag);
177175

178176
rust_port_id register_port(rust_port *port);

0 commit comments

Comments
 (0)