Skip to content

Commit 17c651b

Browse files
committed
Remove task::join_id
This is the old, racy way of joining to a task. It is no longer used.
1 parent 4d66903 commit 17c651b

File tree

3 files changed

+0
-32
lines changed

3 files changed

+0
-32
lines changed

src/lib/task.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ native "cdecl" mod rustrt {
2727
fn task_sleep(time_in_us: uint);
2828
fn task_yield();
2929
fn start_task(id: task_id, closure: *u8);
30-
fn task_join(t: task_id) -> int;
3130
}
3231

3332
native "c-stack-cdecl" mod rustrt2 = "rustrt" {
@@ -83,10 +82,6 @@ fn join(task_port: (task_id, comm::port<task_notification>)) -> task_result {
8382
}
8483
}
8584

86-
fn join_id(t: task_id) -> task_result {
87-
alt rustrt::task_join(t) { 0 { tr_success } _ { tr_failure } }
88-
}
89-
9085
fn unsupervise() { ret sys::unsupervise(); }
9186

9287
fn pin() { rustrt2::pin_task(); }

src/rt/rust_builtin.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -177,32 +177,6 @@ task_yield() {
177177
task->yield(1);
178178
}
179179

180-
extern "C" CDECL intptr_t
181-
task_join(rust_task_id tid) {
182-
rust_task *task = rust_scheduler::get_task();
183-
// If the other task is already dying, we don't have to wait for it.
184-
rust_task *join_task = task->kernel->get_task_by_id(tid);
185-
// FIXME: find task exit status and return that.
186-
if(!join_task) return 0;
187-
join_task->lock.lock();
188-
if (join_task->dead() == false) {
189-
join_task->tasks_waiting_to_join.push(task);
190-
task->block(join_task, "joining local task");
191-
join_task->lock.unlock();
192-
task->yield(2);
193-
}
194-
else {
195-
join_task->lock.unlock();
196-
}
197-
if (!join_task->failed) {
198-
join_task->deref();
199-
return 0;
200-
} else {
201-
join_task->deref();
202-
return -1;
203-
}
204-
}
205-
206180
/* Debug builtins for std::dbg. */
207181

208182
static void

src/rt/rustrt.def.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ vec_reserve_shared
6161
vec_from_buf_shared
6262
task_sleep
6363
task_yield
64-
task_join
6564
unsupervise
6665
upcall_alloc_c_stack
6766
upcall_call_c_stack

0 commit comments

Comments
 (0)