]> git.lizzy.rs Git - rust.git/commitdiff
Make AtomicPtr Send
authorWilliam Throwe <wtt6@cornell.edu>
Wed, 15 Jul 2015 12:09:04 +0000 (08:09 -0400)
committerWilliam Throwe <wtt6@cornell.edu>
Wed, 15 Jul 2015 12:09:04 +0000 (08:09 -0400)
This appears to have just been an oversight, and it is annoying to not
be able to use an Arc<AtomicPtr>.

src/libcore/atomic.rs

index a77df0966431383d92a3bac660a745ff82b2987b..e8d5d83be0faad87e4304b6da1b4c0bebe62401d 100644 (file)
@@ -72,7 +72,7 @@
 
 use self::Ordering::*;
 
-use marker::Sync;
+use marker::{Send, Sync};
 
 use intrinsics;
 use cell::UnsafeCell;
@@ -133,6 +133,7 @@ fn default() -> AtomicPtr<T> {
     }
 }
 
+unsafe impl<T> Send for AtomicPtr<T> {}
 unsafe impl<T> Sync for AtomicPtr<T> {}
 
 /// Atomic memory orderings