@@ -72,8 +72,8 @@ native mod rustrt {
72
72
fn new_task ( ) -> task_id ;
73
73
fn rust_new_task_in_sched ( id : sched_id ) -> task_id ;
74
74
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 > ) ;
77
77
78
78
fn start_task ( id : task , closure : * rust_closure ) ;
79
79
@@ -83,13 +83,7 @@ native mod rustrt {
83
83
84
84
/* Section: Types */
85
85
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 ;
93
87
94
88
type sched_id = int ;
95
89
type task_id = int ;
@@ -132,9 +126,7 @@ fn spawn_inner(
132
126
133
127
// set up notifications if they are enabled.
134
128
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) ;
138
130
}
139
131
140
132
rustrt:: start_task ( id, closure) ;
0 commit comments