stabilize atomics (now atomic)
This commit stabilizes the `std::sync::atomics` module, renaming it to `std::sync::atomic` to match library precedent elsewhere, and tightening up behavior around incorrect memory ordering annotations. The vast majority of the module is now `stable`. However, the `AtomicOption` type has been deprecated, since it is essentially unused and is not truly a primitive atomic type. It will eventually be replaced by a higher-level abstraction like MVars. Due to deprecations, this is a: [breaking-change]
This commit is contained in:
parent
9de20198ae
commit
68bde0a073
36 changed files with 366 additions and 308 deletions
|
@ -52,7 +52,7 @@ use std::os;
|
|||
use std::ptr;
|
||||
use std::rt::rtio;
|
||||
use std::rt::rtio::IoResult;
|
||||
use std::sync::atomics;
|
||||
use std::sync::atomic;
|
||||
use std::comm;
|
||||
|
||||
use io::c;
|
||||
|
@ -207,8 +207,8 @@ impl Timer {
|
|||
// instead of ()
|
||||
unsafe { HELPER.boot(|| {}, helper); }
|
||||
|
||||
static mut ID: atomics::AtomicUint = atomics::INIT_ATOMIC_UINT;
|
||||
let id = unsafe { ID.fetch_add(1, atomics::Relaxed) };
|
||||
static mut ID: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
|
||||
let id = unsafe { ID.fetch_add(1, atomic::Relaxed) };
|
||||
Ok(Timer {
|
||||
id: id,
|
||||
inner: Some(box Inner {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue