@@ -159,7 +159,7 @@ use rt::task::Task;
159159use task:: spawn:: Taskgroup ;
160160use to_bytes:: IterBytes ;
161161use unstable:: atomics:: { AtomicUint , Relaxed } ;
162- use unstable:: sync:: { UnsafeAtomicRcBox , LittleLock } ;
162+ use unstable:: sync:: { UnsafeArc , LittleLock } ;
163163use util;
164164
165165static KILLED_MSG : & ' static str = "killed by linked failure" ;
@@ -170,7 +170,7 @@ static KILL_KILLED: uint = 1;
170170static KILL_UNKILLABLE : uint = 2 ;
171171
172172struct KillFlag ( AtomicUint ) ;
173- type KillFlagHandle = UnsafeAtomicRcBox < KillFlag > ;
173+ type KillFlagHandle = UnsafeArc < KillFlag > ;
174174
175175/// A handle to a blocked task. Usually this means having the ~Task pointer by
176176/// ownership, but if the task is killable, a killer can steal it at any time.
@@ -211,7 +211,7 @@ struct KillHandleInner {
211211
212212/// State shared between tasks used for task killing during linked failure.
213213#[ deriving( Clone ) ]
214- pub struct KillHandle ( UnsafeAtomicRcBox < KillHandleInner > ) ;
214+ pub struct KillHandle ( UnsafeArc < KillHandleInner > ) ;
215215
216216/// Per-task state related to task death, killing, failure, etc.
217217pub struct Death {
@@ -317,7 +317,7 @@ impl BlockedTask {
317317 let handles = match self {
318318 Unkillable ( task) => {
319319 let flag = unsafe { KillFlag ( AtomicUint :: new ( cast:: transmute ( task) ) ) } ;
320- UnsafeAtomicRcBox :: newN ( flag, num_handles)
320+ UnsafeArc :: newN ( flag, num_handles)
321321 }
322322 Killable ( flag_arc) => flag_arc. cloneN ( num_handles) ,
323323 } ;
@@ -380,8 +380,8 @@ impl Eq for KillHandle {
380380impl KillHandle {
381381 pub fn new ( ) -> ( KillHandle , KillFlagHandle ) {
382382 let ( flag, flag_clone) =
383- UnsafeAtomicRcBox :: new2 ( KillFlag ( AtomicUint :: new ( KILL_RUNNING ) ) ) ;
384- let handle = KillHandle ( UnsafeAtomicRcBox :: new ( KillHandleInner {
383+ UnsafeArc :: new2 ( KillFlag ( AtomicUint :: new ( KILL_RUNNING ) ) ) ;
384+ let handle = KillHandle ( UnsafeArc :: new ( KillHandleInner {
385385 // Linked failure fields
386386 killed : flag,
387387 unkillable : AtomicUint :: new ( KILL_RUNNING ) ,
@@ -460,7 +460,7 @@ impl KillHandle {
460460 pub fn notify_immediate_failure ( & mut self ) {
461461 // A benign data race may happen here if there are failing sibling
462462 // tasks that were also spawned-watched. The refcount's write barriers
463- // in UnsafeAtomicRcBox ensure that this write will be seen by the
463+ // in UnsafeArc ensure that this write will be seen by the
464464 // unwrapper/destructor, whichever task may unwrap it.
465465 unsafe { ( * self . get ( ) ) . any_child_failed = true ; }
466466 }
0 commit comments