summary refs log tree commit diff
path: root/src/libstd/sync/atomics.rs
AgeCommit message (Collapse)AuthorLines
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-28Rename Pod into CopyFlavio Percoco-11/+11
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-24std: Unignore atomic testsBrian Anderson-4/+2
2014-03-20std: Update atomic documentation to remove 'mut'Alex Crichton-23/+23
It's all no longer necessary
2014-03-20std: Remove AtomicU64Brian Anderson-52/+0
Support for this is less universal than for word-size things; it has no users; i'd rather play it safe.
2014-03-20std: Make the generic atomics in `sync::atomics` privateBrian Anderson-10/+10
I'm not comfortable exposing public functions that purport to do atomic operations on arbitrary T.
2014-03-20std: Make the generic atomics take unsafe pointersBrian Anderson-45/+45
These mutate values behind references that are Freeze, which is not allowed.
2014-03-20std: Make atomics immutable. #11583Brian Anderson-42/+42
In Rust, the strongest guarantee that `&mut` provides is that the memory pointed to is *not aliased*, whereas `&`'s guarantees are much weaker: that the value can be aliased, and may be mutated under proper precautions (interior mutability). Our atomics though use `&mut` for mutation even while creating multiple aliases, so this changes them to use 'interior mutability', mutating through immutable references.
2014-03-20Make atomics interior Unsafe<T>Flavio Percoco-50/+60
2014-03-17std: Improve docs for atomics. Fix two bugsBrian Anderson-68/+393
This adds lots of docs to the atomics module. Two of the examples are using the future atomics API and are ignored temporarily. I discovered a bug in the way AtomicBool's fetch_nand method is implemented and fixed it by using the correct value for `true`. I also fixed the implementation of AcqRel fences (it was only doing a release barrier), and made a "relaxed" fence a failure.
2014-03-16Remove AtomicFlagCadence Marseille-41/+6
fixes #12943
2014-03-14fix MIPS targetJyun-Yan You-0/+4
I ignored AtomicU64 methods on MIPS target because libgcc doesn't implement MIPS32 64-bit atomic operations. Otherwise it would cause link failure.
2014-02-23std: Move intrinsics to std::intrinsics.Brian Anderson-1/+1
Issue #1457
2014-02-04Register new snapshotsAlex Crichton-190/+0
2014-02-04Replace NonCopyable usage with NoPodFlavio Percoco-20/+20
cc #10834
2014-02-03Various bug fixes and rebase conflictsAlex Crichton-1/+1
2014-02-03Add an AtomicU64 type to std::sync::atomicsAlex Crichton-32/+245
This also generalizes all atomic intrinsics over T so we'll be able to add u8 atomics if we really feel the need to (do we really want to?)
2014-01-22Replace C types with Rust types in libstd, closes #7313Florian Hahn-2/+1
2013-12-24std: Introduce std::syncAlex Crichton-0/+603
For now, this moves the following modules to std::sync * UnsafeArc (also removed unwrap method) * mpsc_queue * spsc_queue * atomics * mpmc_bounded_queue * deque We may want to remove some of the queues, but for now this moves things out of std::rt into std::sync