Skip to content

Commit

Permalink
Auto merge of rust-lang#24834 - shepmaster:default-atomic-ptr, r=alex…
Browse files Browse the repository at this point in the history
…crichton

Closes rust-lang#24613
  • Loading branch information
bors committed Apr 27, 2015
2 parents 5c60145 + 7c548a2 commit b772ce6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libcore/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ pub struct AtomicPtr<T> {
_marker: PhantomData<*mut T>,
}

impl<T> Default for AtomicPtr<T> {
fn default() -> AtomicPtr<T> {
AtomicPtr::new(::ptr::null_mut())
}
}

unsafe impl<T> Sync for AtomicPtr<T> {}

/// Atomic memory orderings
Expand Down

0 comments on commit b772ce6

Please sign in to comment.