Skip to content

Commit e277b77

Browse files
committed
---
yaml --- r: 6201 b: refs/heads/master c: 68f82de h: refs/heads/master i: 6199: df70b3f v: v3
1 parent 516abf0 commit e277b77

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 2f8b69534435d8dc459e5731d8fb41b22725b37f
2+
refs/heads/master: 68f82de8178ca5f7ed7a3803fdc41f84fc97664b

trunk/src/lib/task.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export spawn_joinable;
5353
native "cdecl" mod rustrt {
5454
// these must run on the Rust stack so that they can swap stacks etc:
5555
fn task_sleep(time_in_us: uint);
56-
fn task_yield();
5756
}
5857

5958
native "c-stack-cdecl" mod rustrt2 = "rustrt" {
@@ -149,7 +148,7 @@ Yield control to the task scheduler
149148
150149
The scheduler may schedule another task to execute.
151150
*/
152-
fn yield() { ret rustrt::task_yield(); }
151+
fn yield() { sleep(1u) }
153152

154153
/*
155154
Function: join

trunk/src/rt/rust_builtin.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,6 @@ task_sleep(size_t time_in_us) {
171171
task->yield(time_in_us);
172172
}
173173

174-
extern "C" CDECL void
175-
task_yield() {
176-
rust_task *task = rust_scheduler::get_task();
177-
task->yield(1);
178-
}
179-
180174
/* Debug builtins for std::dbg. */
181175

182176
static void

trunk/src/rt/rustrt.def.in

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ start_task
6060
vec_reserve_shared
6161
vec_from_buf_shared
6262
task_sleep
63-
task_yield
6463
unsupervise
6564
upcall_alloc_c_stack
6665
upcall_call_c_stack

trunk/src/test/run-pass/bind-native.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Can we bind native things?
33
*/
44

55
native "c-stack-cdecl" mod rustrt {
6-
fn task_yield();
6+
fn task_sleep();
77
}
88

9-
fn main() { bind rustrt::task_yield(); }
9+
fn main() { bind rustrt::task_sleep(); }

0 commit comments

Comments
 (0)