@@ -25,7 +25,7 @@ use std::rt::local::Local;
25
25
use std:: rt:: rtio;
26
26
use std:: rt:: task:: { Task , BlockedTask , SendMessage } ;
27
27
use std:: task:: TaskOpts ;
28
- use std:: unstable:: mutex:: StaticNativeMutex ;
28
+ use std:: unstable:: mutex:: NativeMutex ;
29
29
use std:: unstable:: raw;
30
30
31
31
use context:: Context ;
@@ -65,7 +65,7 @@ pub struct GreenTask {
65
65
pool_id : uint ,
66
66
67
67
// See the comments in the scheduler about why this is necessary
68
- nasty_deschedule_lock : StaticNativeMutex ,
68
+ nasty_deschedule_lock : NativeMutex ,
69
69
}
70
70
71
71
pub enum TaskType {
@@ -163,7 +163,7 @@ impl GreenTask {
163
163
task_type : task_type,
164
164
sched : None ,
165
165
handle : None ,
166
- nasty_deschedule_lock : unsafe { StaticNativeMutex :: new ( ) } ,
166
+ nasty_deschedule_lock : unsafe { NativeMutex :: new ( ) } ,
167
167
task : Some ( ~Task :: new ( ) ) ,
168
168
}
169
169
}
@@ -322,7 +322,7 @@ impl GreenTask {
322
322
// uncontended except for when the task is rescheduled).
323
323
fn reawaken_remotely ( mut ~self ) {
324
324
unsafe {
325
- let mtx = & mut self . nasty_deschedule_lock as * mut StaticNativeMutex ;
325
+ let mtx = & mut self . nasty_deschedule_lock as * mut NativeMutex ;
326
326
let handle = self . handle . get_mut_ref ( ) as * mut SchedHandle ;
327
327
let _guard = ( * mtx) . lock ( ) ;
328
328
( * handle) . send ( RunOnce ( self ) ) ;
@@ -478,12 +478,6 @@ impl Runtime for GreenTask {
478
478
fn wrap ( ~self ) -> ~Any { self as ~Any }
479
479
}
480
480
481
- impl Drop for GreenTask {
482
- fn drop ( & mut self ) {
483
- unsafe { self . nasty_deschedule_lock . destroy ( ) ; }
484
- }
485
- }
486
-
487
481
#[ cfg( test) ]
488
482
mod tests {
489
483
use std:: rt:: Runtime ;
0 commit comments