Skip to content

Commit 129869f

Browse files
committed
---
yaml --- r: 14152 b: refs/heads/try c: ae2968d h: refs/heads/master v: v3
1 parent 27ae7e2 commit 129869f

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: d756b01619444bbbaa27d1f43ca4000c976c8bee
5+
refs/heads/try: ae2968d10a87b0f467b25ccde2e2a2eb3741e017
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libcore/task.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ native mod rustrt {
7272
fn new_task() -> task_id;
7373
fn rust_new_task_in_sched(id: sched_id) -> task_id;
7474

75-
fn drop_task(task_id: *rust_task);
76-
fn get_task_pointer(id: task_id) -> *rust_task;
75+
fn rust_task_config_notify(
76+
id: task_id, &&chan: comm::chan<task_notification>);
7777

7878
fn start_task(id: task, closure: *rust_closure);
7979

@@ -83,13 +83,7 @@ native mod rustrt {
8383

8484
/* Section: Types */
8585

86-
type rust_task =
87-
{id: task,
88-
mutable notify_enabled: int,
89-
mutable notify_chan: comm::chan<task_notification>,
90-
mutable stack_ptr: *u8};
91-
92-
resource rust_task_ptr(task: *rust_task) { rustrt::drop_task(task); }
86+
type rust_task = *ctypes::void;
9387

9488
type sched_id = int;
9589
type task_id = int;
@@ -132,9 +126,7 @@ fn spawn_inner(
132126

133127
// set up notifications if they are enabled.
134128
option::may(notify) {|c|
135-
let task_ptr <- rust_task_ptr(rustrt::get_task_pointer(id));
136-
(**task_ptr).notify_enabled = 1;
137-
(**task_ptr).notify_chan = c;
129+
rustrt::rust_task_config_notify(id, c);
138130
}
139131

140132
rustrt::start_task(id, closure);

0 commit comments

Comments
 (0)