about summary refs log tree commit diff
path: root/src/libcore/sync
AgeCommit message (Collapse)AuthorLines
2017-05-18core: fix unused_macro warningJorge Aparicio-0/+1
when compiling the crate for a target with max-atomic-width = 0 fixes #42097
2017-05-02Rollup merge of #41217 - topecongiro:docs/atomic-fence, r=steveklabnikCorey Farwell-3/+52
Update docs of 'fence' This PR updates the docs for `std::sync::atomic::fence` with an example and a diagram. Part of #29377. r? @steveklabnik
2017-05-01Added spin loop pause functionSteven Stewart-Gallus-0/+23
2017-05-01Add an example for 'fence'topecongiro-3/+52
2017-04-13Rename compiler_barrier to compiler_fenceJon Gjengset-6/+6
This addresses concerns raised following the merge of #41092. Specifically: > The naming of these seems surprising: the multithreaded functions (and > both the single and multithreaded intrinsics themselves) are fences, > but this is a barrier. It's not incorrect, but the latter is both > inconsistent with the existing functions and slightly confusing with > another type in std (e.g., `Barrier`). `compiler_fence` carries the same semantic implication that this is a compiler-only operation, while being more in line with the fence/barrier concepts already in use in `std`.
2017-04-08Auto merge of #41092 - jonhoo:std-fence-intrinsics, r=alexcrichtonbors-0/+41
Add safe wrapper for atomic_compilerfence intrinsics This PR adds a proposed safe wrapper for the `atomic_singlethreadfence_*` intrinsics introduced by [RFC #888](https://github.com/rust-lang/rfcs/pull/888). See #41091 for further discussion.
2017-04-07Replace compare_exchange with swapStjepan Glavina-8/+3
2017-04-07Optimize AtomicBool::fetch_nandStjepan Glavina-9/+13
2017-04-06Fix Markdown issues in the docsOliver Middleton-2/+3
* Since the switch to pulldown-cmark reference links need a blank line before the URLs. * Reference link references are not case sensitive. * Doc comments need to be indented uniformly otherwise rustdoc gets confused.
2017-04-06Add unstable book entryJon Gjengset-1/+1
2017-04-05Rollup merge of #40927 - stjepang:docs-atomic-overflow-note, r=alexcrichtonAriel Ben-Yehuda-10/+29
Add a note about overflow for fetch_add/fetch_sub Fixes #40916 Fixes #34618 r? @steveklabnik
2017-04-05Add safe wrapper for atomic_singlethreadfence_*Jon Gjengset-0/+41
2017-03-30More consistent wordingStjepan Glavina-10/+25
2017-03-30Add a note about overflow for fetch_add/fetch_subStjepan Glavina-0/+4
2017-03-29Fixing formatting issues #29377projektir-38/+42
2017-03-27Adding links for Atomics docs #29377projektir-38/+66
2017-02-06Revert "Add 128-bit atomics"Alex Crichton-18/+0
This reverts commit 9903975003276cc42a1ed5f21eee292b7c62c331.
2017-02-05Rollup merge of #38959 - Amanieu:atomic128, r=alexcrichtonCorey Farwell-0/+18
Add 128-bit atomics This is currently only supported on AArch64 since that is the only target which unconditionally supports 128-bit atomic operations. cc #35118
2017-01-27Fix a few links in the docsOliver Middleton-2/+2
2017-01-20Revert previous commitGeoff Yoerger-4/+0
2017-01-19Clarify the `default` option to useGeoff Yoerger-1/+6
2017-01-19Into item level docs (enum Ordering)Geoff Yoerger-0/+2
2017-01-19'.'Geoff Yoerger-1/+1
2017-01-19Module level docGeoff Yoerger-1/+2
2017-01-10Add 128-bit atomicsAmanieu d'Antras-0/+18
2016-12-29Rollup merge of #38674 - GuillaumeGomez:atomic_fn_docs, r=frewsxcvAlex Crichton-8/+15
Add missing urls for atomic fn docs r? @frewsxcv
2016-12-29Rollup merge of #38649 - GuillaumeGomez:atomicint_docs, r=frewsxcvAlex Crichton-17/+36
Add missing urls for atomic_int macros types r? @frewsxcv
2016-12-29Rollup merge of #38635 - GuillaumeGomez:atomicptr_docs, r=frewsxcvAlex Crichton-14/+37
Add missing urls for AtomicPtr r? @frewsxcv
2016-12-29Add missing urls for atomic fn docsGuillaume Gomez-8/+15
2016-12-28Add missing urls for AtomicPtrGuillaume Gomez-14/+37
2016-12-28Add missing urls for atomic_int macros typesGuillaume Gomez-17/+36
2016-12-26Add missing urls in AtomicBool docsGuillaume Gomez-13/+35
2016-12-15Stabilize std::sync::atomic::Atomic*::{get_mut, into_inner}Aaron Turon-12/+6
2016-10-23Prevent exhaustive matching of Ordering to allow for future extensionAmanieu d'Antras-0/+18
2016-10-16Run rustfmt on libcore/sync folderSrinivas Reddy Thatiparthy-56/+58
2016-10-02fix typosGuillaume Gomez-1/+1
2016-09-11Documentation for default types modifiedathulappadan-1/+1
2016-09-11Documentation of what does for each typeathulappadan-0/+2
2016-08-24Use `#[prelude_import]` in `libcore`.Jeffrey Seyfried-6/+0
2016-08-18Auto merge of #35719 - Amanieu:atomic_access, r=alexcrichtonbors-0/+142
Implement RFC 1649 cc #35603 rust-lang/rfcs#1649 r? @alexcrichton
2016-08-16Implement RFC 1649Amanieu d'Antras-0/+142
2016-08-11Use an existing constant name as an example.Andrii Dmytrenko-1/+1
2016-08-02core: fix `cargo build` for targets with "max-atomic-width": 0Jorge Aparicio-0/+2
This crate was failing to compile due to dead_code/unused_imports warnings. This commits disables these two lints for these targets.
2016-06-02atomic doc: fix statementWojciech Nawrocki-3/+3
2016-05-31mk: Prepare for a new stage0 compilerAlex Crichton-14/+14
This commit prepares the source for a new stage0 compiler, the 1.10.0 beta compiler. These artifacts are hot off the bots and should be ready to go.
2016-05-25Auto merge of #33699 - alexcrichton:stabilize-1.10, r=aturonbors-12/+6
std: Stabilize APIs for the 1.10 release This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018
2016-05-24std: Stabilize APIs for the 1.10 releaseAlex Crichton-12/+6
This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 cc #27784 (but encode methods still exist) Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018
2016-05-19Catch thread in exampleStefan Schindler-3/+8
- Consume result of thread join() - Add link to threading model
2016-05-15Rollup merge of #33534 - dns2utf8:atomic_docs, r=GuillaumeGomezManish Goregaokar-2/+2
Simplify text This way it should be clear: Any number of other threads have this guaranty not just one other thread.
2016-05-13Make AtomicBool the same size as boolAmanieu d'Antras-58/+36