commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
55413956c36aeab47feb8c04d1b7a044d6df336a | Roland Kuhn | 2024-11-20T16:29:34 | release v1.0.2 | diff --git a/Cargo.toml b/Cargo.toml
index 2b1d258..59e8d21 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sync_wrapper"
-version = "1.0.1"
+version = "1.0.2"
authors = ["Actyx AG <developer@actyx.io>"]
edition = "2021"
description = "A tool for enlisting the compiler's help in proving ... | 1 | 1 | 1 |
3b20009c1590a81754d81ad201c84a7fe1445970 | Anthony Ramine | 2024-11-20T09:39:02 | Implement Debug for SyncFuture and SyncStream | diff --git a/src/lib.rs b/src/lib.rs
index 2800d9a..a508e2f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -212,6 +212,11 @@ impl <F: Future> Future for SyncFuture<F> {
inner.poll(cx)
}
}
+impl<T> Debug for SyncFuture<T> {
+ fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+ f.pad("SyncFuture... | 1 | 11 | 1 |
3de3ec10cc2bfaa7b44922b85bb07d908dd08c9a | Roland Kuhn | 2024-04-08T08:41:41 | switch to edition 2021 and all-features | diff --git a/Cargo.toml b/Cargo.toml
index c0209a1..2b1d258 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,7 +2,7 @@
name = "sync_wrapper"
version = "1.0.1"
authors = ["Actyx AG <developer@actyx.io>"]
-edition = "2018"
+edition = "2021"
description = "A tool for enlisting the compiler's help in proving the absence ... | 1 | 2 | 2 |
ec3abb02497d85698d805ea8bcb5d2ef97b81303 | Roland Kuhn | 2024-04-08T08:31:57 | release 1.0.1 | diff --git a/Cargo.toml b/Cargo.toml
index e7a9049..c0209a1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sync_wrapper"
-version = "1.0.0"
+version = "1.0.1"
authors = ["Actyx AG <developer@actyx.io>"]
edition = "2018"
description = "A tool for enlisting the compiler's help in proving ... | 1 | 1 | 1 |
1a4bdf6f056387c9aacd536b9ed5d581c2830b18 | Paolo Barbolini | 2024-04-08T08:21:21 | Enable `futures` feature in docs.rs build | diff --git a/Cargo.toml b/Cargo.toml
index 10e3e24..e7a9049 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,3 +21,7 @@ futures = { version = "0.3" }
[dependencies]
futures-core = { version = "0.3", default-features = false, optional = true }
+
+[package.metadata.docs.rs]
+features = ["futures"]
+ | 1 | 4 | 0 |
763f49a9b53dcd263f00525cca5d11b6fef101f0 | Roland Kuhn | 2024-03-14T21:38:26 | release 1.0.0 | diff --git a/Cargo.toml b/Cargo.toml
index 678b869..10e3e24 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sync_wrapper"
-version = "0.1.2"
+version = "1.0.0"
authors = ["Actyx AG <developer@actyx.io>"]
edition = "2018"
description = "A tool for enlisting the compiler's help in proving ... | 1 | 1 | 1 |
659ef11fe202fd344efc7c1cc25007cbface5d3a | Ali Sajid Imami | 2024-03-12T16:26:01 | style: replace the smartquote in Cargo.toml with a standard apostrophe | diff --git a/Cargo.toml b/Cargo.toml
index 22aa494..678b869 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ name = "sync_wrapper"
version = "0.1.2"
authors = ["Actyx AG <developer@actyx.io>"]
edition = "2018"
-description = "A tool for enlisting the compiler’s help in proving the absence of concurrency"
+de... | 1 | 1 | 1 |
7ebf2994396d88738067a09cf354cbb0d6ac1084 | Roland Kuhn | 2023-02-01T15:50:03 | make futures-core dep optional and release 0.1.2 | diff --git a/Cargo.toml b/Cargo.toml
index 6fffa06..22aa494 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sync_wrapper"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Actyx AG <developer@actyx.io>"]
edition = "2018"
description = "A tool for enlisting the compiler’s help in proving ... | 2 | 10 | 3 |
778cffe43eff21bed80193e122178daed90e7ad0 | Akira Hayakawa | 2021-08-16T08:43:07 | add default wrapper implementations (#1) | diff --git a/Cargo.toml b/Cargo.toml
index 93e28e7..6fffa06 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,3 +14,7 @@ categories = ["concurrency"]
[dev-dependencies]
pin-project-lite = "0.2.7"
+futures = { version = "0.3" }
+
+[dependencies]
+futures-core = { version = "0.3", default-features = false }
\ No newlin... | 2 | 65 | 0 |
0cad592ae373b112f7691f1a730f4ac9c3a24a1a | KaiJewson | 2021-08-14T06:28:47 | Link to repository in Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index 4e2d988..280fc67 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,7 @@ authors = ["Actyx AG <developer@actyx.io>"]
edition = "2018"
description = "A tool for enlisting the compiler’s help in proving the absence of concurrency"
readme = "README.md"
+repository = "https://... | 1 | 1 | 0 |
1b7f37f70f90d89970ea820de45b77bcb7abc17f | KaiJewson | 2021-08-14T06:26:07 | Make library no_std | diff --git a/src/lib.rs b/src/lib.rs
index 31c2eef..50ee779 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -18,6 +18,7 @@
//! This library is inspired by [this discussion](https://internals.rust-lang.org/t/what-shall-sync-mean-across-an-await/12020/2).
#![doc(html_logo_url = "https://developer.actyx.com/img/logo.svg")]
... | 1 | 1 | 0 |
3052a6be42a428e5d0c3dde7ae94ce4968930a07 | KaiJewson | 2021-08-14T06:38:51 | Implement `From<T>` for `SyncWrapper<T>` | diff --git a/src/lib.rs b/src/lib.rs
index 3b9a43a..33f75ab 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -138,3 +138,9 @@ impl<T: Default> Default for SyncWrapper<T> {
Self::new(T::default())
}
}
+
+impl<T> From<T> for SyncWrapper<T> {
+ fn from(value: T) -> Self {
+ Self::new(value)
+ }
+} | 1 | 6 | 0 |
c6e71fe1cc075a2d90bb556e26983addf8669a08 | KaiJewson | 2021-08-14T06:22:26 | Make `SyncWrapper::new` const | diff --git a/src/lib.rs b/src/lib.rs
index 053f1c1..31c2eef 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -70,7 +70,7 @@ impl<T> SyncWrapper<T> {
///
/// let mutex = SyncWrapper::new(42);
/// ```
- pub fn new(value: T) -> Self {
+ pub const fn new(value: T) -> Self {
Self(value)
} | 1 | 1 | 1 |
38dc8f38ada467e689b3b68bc2d508ea0d82690a | KaiJewson | 2021-08-14T06:38:08 | Implement `Default` for `SyncWrapper` | diff --git a/src/lib.rs b/src/lib.rs
index 4387dd5..3b9a43a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -132,3 +132,9 @@ impl<T> Debug for SyncWrapper<T> {
f.pad("SyncWrapper")
}
}
+
+impl<T: Default> Default for SyncWrapper<T> {
+ fn default() -> Self {
+ Self::new(T::default())
+ }
+} | 1 | 6 | 0 |
54367f1ae81895947afa0334ee7d7bc6cfd24e92 | KaiJewson | 2021-08-14T06:35:01 | Implement `Debug` for `SyncWrapper`
This change allows users to `#[derive(Debug)]` on types that contain
`SyncWrapper`. The actual implementation does not give any useful
information, but that is fine because nothing could be done anyway. | diff --git a/src/lib.rs b/src/lib.rs
index 053f1c1..4387dd5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -19,6 +19,8 @@
#![doc(html_logo_url = "https://developer.actyx.com/img/logo.svg")]
#![doc(html_favicon_url = "https://developer.actyx.com/img/favicon.ico")]
+use core::fmt::{self, Debug, Formatter};
+
/// A mutu... | 1 | 8 | 0 |
02b6469b0b55bfde5083d40e5762b5d281d67837 | KaiJewson | 2021-08-14T06:21:37 | Add `SyncWrapper::get_pin_mut` | diff --git a/Cargo.lock b/Cargo.lock
index bb937a9..08566d7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,5 +1,16 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.7"
+source = "registry+https://github.... | 3 | 49 | 0 |
b911fe598b92184a9b99cb1c617e074d1b215979 | Daniel Henry-Mantilla | 2021-05-17T16:15:22 | Remove the `T : Send` for `SyncWrapper` to be `Sync`
Indeed, it is not necessary: `Inner : Send => Wrapper : Sync` is only required for `Wrapper`s allowing `&Wrapper -> &mut Inner` code paths such as `Mutex` or, less obviously, `Arc` | diff --git a/src/lib.rs b/src/lib.rs
index b10e8e1..053f1c1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -123,4 +123,4 @@ impl<T> SyncWrapper<T> {
// this is safe because the only operations permitted on this data structure require exclusive
// access or ownership
-unsafe impl<T: Send> Sync for SyncWrapper<T> {}
+un... | 1 | 1 | 1 |
79371d8ece07f5916da9ec014208f8ae29593568 | Alexander Kjäll | 2025-09-14T18:09:10 | fix x86 32 bit build | diff --git a/src/lib.rs b/src/lib.rs
index 53856cd..aede1a5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -535,6 +535,13 @@ mod tests {
assert_serde(&a, 30);
}
+ // on 32-bit x86 64 bit atomics exist, but they can't be used to implement
+ // atomic<i64> because AtomicI64 has a greater alignment requ... | 1 | 18 | 0 |
cecd5f95c38a509e8231c1479f625e4abab7612a | Ben Pfaff | 2025-06-03T17:34:14 | Use `Relaxed` memory ordering for `Debug` and serde serialization.
Signed-off-by: Ben Pfaff <blp@cs.stanford.edu> | diff --git a/src/lib.rs b/src/lib.rs
index 1de280f..53856cd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -91,7 +91,7 @@ impl<T: Default> Default for Atomic<T> {
impl<T: NoUninit + fmt::Debug> fmt::Debug for Atomic<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("Atomic")
- ... | 2 | 2 | 2 |
802ec51f2b4773d9a59b96a4cb9605838980d152 | Amanieu d'Antras | 2023-05-15T15:17:50 | Bump version to 0.5.3 | diff --git a/Cargo.toml b/Cargo.toml
index a521f9f..6471054 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.5.2"
+version = "0.5.3"
edition = "2018"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
@@ -14,4 +14,4 @@ k... | 1 | 2 | 2 |
5989a43e97cf96a99c95ca1c83a5fdf3af752b24 | Albin Hedman | 2023-01-12T11:23:36 | Fix wrong cfg_attr syntax
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com> | diff --git a/src/lib.rs b/src/lib.rs
index e0065b1..1f89ca6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,7 +33,7 @@
#![warn(missing_docs)]
#![warn(rust_2018_idioms)]
#![no_std]
-#![cfg_attr(nightly, feature(integer_atomics))]
+#![cfg_attr(feature = "nightly", feature(integer_atomics))]
#[cfg(any(test, feature ... | 1 | 1 | 1 |
c1fc7b2b405d8c0c85525b9e0e92a93563629605 | Albin Hedman | 2023-01-12T09:45:01 | Put i/u128 behind feature | diff --git a/Cargo.toml b/Cargo.toml
index 0fd9c94..a521f9f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,3 +14,4 @@ keywords = ["atomic", "no_std"]
default = ["fallback"]
std = []
fallback = []
+nightly = []
\ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs
index 10f6c6d..e0065b1 100644
--- a/src/l... | 3 | 10 | 5 |
f3b26c9004fc2297e492b43930a230915c39aa8a | Albin Hedman | 2023-01-12T09:04:19 | Use target_has_atomic instead of depending on autocfg | diff --git a/Cargo.toml b/Cargo.toml
index d8474c5..0fd9c94 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,6 +14,3 @@ keywords = ["atomic", "no_std"]
default = ["fallback"]
std = []
fallback = []
-
-[build-dependencies]
-autocfg = "1"
diff --git a/build.rs b/build.rs
deleted file mode 100644
index 4cf4274..0000000
... | 4 | 51 | 46 |
319aa964317bd12c7fd245338b97cee747b3efa3 | Amanieu d'Antras | 2022-05-24T12:56:28 | Bump version to 0.5.2 | diff --git a/Cargo.toml b/Cargo.toml
index 80b613b..d8474c5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.5.1"
+version = "0.5.2"
edition = "2018"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type" | 1 | 1 | 1 |
fdf55c42a5778728e024c65578a0edb0e6b27082 | Amanieu d'Antras | 2022-05-23T22:14:08 | Work around rust-lang/rust#87341
UnsafeCell unfortunately lets the niches of the inner type "leak
through" to the outer type, which can cause unsoundness.
Fixes #29 | diff --git a/src/fallback.rs b/src/fallback.rs
index 8b7e861..2f9f7fd 100644
--- a/src/fallback.rs
+++ b/src/fallback.rs
@@ -6,12 +6,13 @@
// copied, modified, or distributed except according to those terms.
use core::cmp;
+use core::hint;
use core::mem;
use core::num::Wrapping;
use core::ops;
use core::ptr;
u... | 2 | 33 | 23 |
4902333f255c3b0292da40f8a9ea6cb17e8fcd14 | Amanieu d'Antras | 2021-11-10T18:59:24 | Bump version to v0.5.1 | diff --git a/Cargo.toml b/Cargo.toml
index df5c1d4..80b613b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.5.0"
+version = "0.5.1"
edition = "2018"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type" | 1 | 1 | 1 |
da129b4fba7f823cc268c87962e9a05694d3d913 | Amanieu d'Antras | 2021-11-10T18:58:26 | Fix documentation for allowed failure orderings on compare_exchange
Fixes #24 | diff --git a/src/lib.rs b/src/lib.rs
index a159daf..09ad879 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -171,7 +171,7 @@ impl<T: Copy> Atomic<T> {
/// `compare_exchange` takes two `Ordering` arguments to describe the memory
/// ordering of this operation. The first describes the required ordering if
/// ... | 1 | 2 | 2 |
0932d0fd57e3ea0f0d7d18389129dbad77407816 | Adam Reichold | 2020-08-02T06:25:29 | Make fallback implementation optional to increase confidence in performance characteristics. | diff --git a/Cargo.toml b/Cargo.toml
index ce11171..f4b8d30 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,9 @@ readme = "README.md"
keywords = ["atomic", "no_std"]
[features]
+default = ["fallback"]
std = []
+fallback = []
[build-dependencies]
autocfg = "1"
diff --git a/src/lib.rs b/src/lib.rs
index 71... | 3 | 10 | 0 |
35579fc88bfc34438054b646ee81695ccc61dc69 | Adam Reichold | 2020-08-04T18:19:15 | Upgrade to Rust edition 2018. | diff --git a/Cargo.toml b/Cargo.toml
index d8bae78..ce11171 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,7 @@
[package]
name = "atomic"
version = "0.4.6"
+edition = "2018"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.gith... | 4 | 5 | 6 |
833996f2b9c31a2f3851f8ad0f497a0f76bbc2fe | Adam Reichold | 2020-08-04T19:18:33 | Remove fallback to word-sized atomics as we explicitly detect the available atomics now. | diff --git a/build.rs b/build.rs
index fb7c6c5..3f9e906 100644
--- a/build.rs
+++ b/build.rs
@@ -4,22 +4,13 @@ fn main() {
let ac = autocfg::new();
for root in &["core", "std"] {
- ac.emit_path_cfg(
- &format!("{}::sync::atomic::AtomicUsize", root),
- "has_atomic_usize",
- ... | 3 | 16 | 106 |
7db30b4f1ba1b7953023734ae20cb5ba34c120a9 | Adam Reichold | 2020-08-02T06:20:07 | Port the fetch_update implementation from the standard library. | diff --git a/src/lib.rs b/src/lib.rs
index d6b19a6..f66e487 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -228,6 +228,62 @@ impl<T: Copy> Atomic<T> {
) -> Result<T, T> {
unsafe { ops::atomic_compare_exchange_weak(self.v.get(), current, new, success, failure) }
}
+
+ /// Fetches the value, and applie... | 1 | 56 | 0 |
e52d9075341c4421f492e9c49a05b48068d8bb54 | Amanieu d'Antras | 2020-07-05T07:46:40 | Bump version to 0.4.6 | diff --git a/Cargo.toml b/Cargo.toml
index e00120b..0e14093 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.4.5"
+version = "0.4.6"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
e9ee099123e4ae61ef9c2ab5f57188950ae64383 | Jasen Borisov | 2020-07-04T23:17:56 | ops.rs: fix compiler error from missing imports
only import the types that are supported by the compile target | diff --git a/src/ops.rs b/src/ops.rs
index dad5a60..3626c9e 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -12,10 +12,14 @@ use core::ops;
use core::sync::atomic::Ordering;
use fallback;
-#[cfg(feature = "nightly")]
-use core::sync::atomic::{
- AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicU16, AtomicU32, Atomic... | 1 | 8 | 4 |
b8b900f26bdaa9746b9a9c70539eb5429ca524d2 | Hadrien G | 2019-09-05T22:23:13 | Apply review recommendations | diff --git a/src/lib.rs b/src/lib.rs
index 0d78da9..d6b19a6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -31,20 +31,15 @@
//! are often used for lazy global initialization.
#![warn(missing_docs)]
-#![cfg_attr(
- not(feature = "std"), no_std
-)]
+#![no_std]
#![cfg_attr(
feature = "nightly", feature(const_fn,... | 1 | 2 | 8 |
973c055f82e75dd8b78912ab9b3f873471d7919c | Hadrien G | 2019-09-05T22:17:55 | Provide a RefUnwindSafe implementation when 'std' feature is enabled | diff --git a/Cargo.toml b/Cargo.toml
index 16d0f66..e00120b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,3 +11,4 @@ keywords = ["atomic", "no_std"]
[features]
nightly = []
+std = []
diff --git a/src/lib.rs b/src/lib.rs
index d75fe8e..0d78da9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -31,21 +31,29 @@
//! are o... | 2 | 21 | 2 |
1faf633024a3aa93f03b12192efd7c2fabd1e8d6 | Amanieu d'Antras | 2019-05-16T19:32:52 | Bump version to 0.4.5 | diff --git a/Cargo.toml b/Cargo.toml
index 6f89d49..16d0f66 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.4.4"
+version = "0.4.5"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
13bf2ba36c36b185adbc0003a77f66316b07960d | MSxDOS | 2019-05-16T16:49:39 | Fix description | diff --git a/src/lib.rs b/src/lib.rs
index 6f75842..d75fe8e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -114,7 +114,7 @@ impl<T: Copy> Atomic<T> {
ops::atomic_is_lock_free::<T>()
}
- /// Returns a mutable reference to the underlying integer.
+ /// Returns a mutable reference to the underlying type... | 1 | 1 | 1 |
2def863339b007317054e3febb3cb5fb076efb4b | MSxDOS | 2019-05-16T13:27:41 | Add 'get_mut' and 'into_inner' methods | diff --git a/src/lib.rs b/src/lib.rs
index a8ad0b9..6f75842 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -114,6 +114,24 @@ impl<T: Copy> Atomic<T> {
ops::atomic_is_lock_free::<T>()
}
+ /// Returns a mutable reference to the underlying integer.
+ ///
+ /// This is safe because the mutable referen... | 1 | 18 | 0 |
44c9d899b4bb9acaae1ca012a1ab574cc7f61718 | M Farkas-Dyck | 2018-10-03T01:50:13 | repr(transparent) | diff --git a/src/lib.rs b/src/lib.rs
index a8ad0b9..3eb5b99 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -51,6 +51,7 @@ mod ops;
/// A generic atomic wrapper type which allows an object to be safely shared
/// between threads.
+#[repr(transparent)]
pub struct Atomic<T: Copy> {
v: UnsafeCell<T>,
} | 1 | 1 | 0 |
94bbce42eb4a06b3ec21d0340062fd602117aa67 | Amanieu d'Antras | 2019-02-22T19:47:35 | Bump version to 0.4.4 | diff --git a/Cargo.toml b/Cargo.toml
index 13e71aa..6f89d49 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.4.3"
+version = "0.4.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
0d656180cfda9a035366932adcc0e24ea93f5e30 | Kevin Boos | 2019-02-22T19:32:30 | update for latest nightly that changes integer_atomics | diff --git a/src/fallback.rs b/src/fallback.rs
index aa95c1f..8b7e861 100644
--- a/src/fallback.rs
+++ b/src/fallback.rs
@@ -11,7 +11,7 @@ use core::num::Wrapping;
use core::ops;
use core::ptr;
use core::slice;
-use core::sync::atomic::{self, AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
+use core::sync::atomic::{self,... | 2 | 3 | 3 |
f620658d7299110885406ef16bcdf78b8496c8fb | Amanieu d'Antras | 2019-01-14T17:44:22 | Bump version to 0.4.3 | diff --git a/Cargo.toml b/Cargo.toml
index 7d43262..13e71aa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.4.2"
+version = "0.4.3"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
b0622d50ed2f1241b6d52821c1f0facb8a5675da | Amanieu d'Antras | 2019-01-14T17:43:43 | Update for latest nightly
Fixes #7 | diff --git a/src/lib.rs b/src/lib.rs
index 9f968c5..02cd863 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,7 +33,7 @@
#![warn(missing_docs)]
#![no_std]
#![cfg_attr(
- feature = "nightly", feature(const_fn, const_int_ops, const_let, cfg_target_has_atomic, integer_atomics, atomic_min_max)
+ feature = "nightly",... | 1 | 1 | 1 |
dda6dde4c5bf72c234142fcfb820224a8d41d27b | Amanieu d'Antras | 2018-12-09T15:58:34 | Bump version to 0.4.2 | diff --git a/Cargo.toml b/Cargo.toml
index 58de88b..7d43262 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.4.1"
+version = "0.4.2"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
fbf6783ddd747465817f87e62166effcccaffabc | Peter Gerber | 2018-12-09T12:32:28 | Fix compile error when nightly feature is enabled
Stop using the && operator in const functions. It not yet allowed there.
The error:
$ cargo +nightly build --features nightly
Compiling atomic v0.4.1 (/home/user/src/atomic-rs)
error[E0019]: constant function contains unimplemented expression type
--> src/ops.rs... | diff --git a/src/ops.rs b/src/ops.rs
index 06bce44..dad5a60 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -28,7 +28,8 @@ const ALIGNOF_USIZE: usize = mem::align_of::<usize>();
#[inline]
pub const fn atomic_is_lock_free<T>() -> bool {
let size = mem::size_of::<T>();
- 1 == size.count_ones() && 8 >= size && mem::... | 1 | 2 | 1 |
40eaa047c57b178b79a70ea46e00a8fb0b2acbdb | Amanieu d'Antras | 2018-07-30T09:05:59 | Bump version to 0.4.1 | diff --git a/Cargo.toml b/Cargo.toml
index b879269..58de88b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.4.0"
+version = "0.4.1"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
b77eb3f36f9a01355686923dfeeb67bfc8a664a3 | M Farkas-Dyck | 2018-07-30T08:48:27 | const fn is_lock_free | diff --git a/src/lib.rs b/src/lib.rs
index 331d916..9f968c5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,7 +33,7 @@
#![warn(missing_docs)]
#![no_std]
#![cfg_attr(
- feature = "nightly", feature(const_fn, cfg_target_has_atomic, integer_atomics, atomic_min_max)
+ feature = "nightly", feature(const_fn, const_i... | 2 | 23 | 29 |
d606b09bdf61bb307cb4759b7ad722f1e9210e12 | Amanieu d'Antras | 2018-06-21T16:02:39 | Add fetch_min and fetch_max operations | diff --git a/src/fallback.rs b/src/fallback.rs
index f1d3b84..aa95c1f 100644
--- a/src/fallback.rs
+++ b/src/fallback.rs
@@ -5,12 +5,13 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
+use core::cmp;
use core::mem;... | 3 | 397 | 12 |
0580d7371ac4939ee513e17d881b3f7c9ea21fe6 | Amanieu d'Antras | 2018-06-21T15:42:42 | Add extended atomic ops for isize and i128 | diff --git a/src/lib.rs b/src/lib.rs
index 89e7888..2ea74ff 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -44,8 +44,8 @@ pub use core::sync::atomic::{fence, Ordering};
use core::cell::UnsafeCell;
use core::fmt;
-mod ops;
mod fallback;
+mod ops;
/// A generic atomic wrapper type which allows an object to be safely... | 1 | 53 | 4 |
b232db0350100894d476441686362f2db68d25de | Amanieu d'Antras | 2018-06-21T15:27:38 | Unify the nightly and stable implementations | diff --git a/src/lib.rs b/src/lib.rs
index 5743d02..89e7888 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -32,8 +32,7 @@
#![warn(missing_docs)]
#![no_std]
-#![cfg_attr(feature = "nightly", feature(const_fn, extended_compare_and_swap))]
-#![cfg_attr(feature = "nightly", feature(cfg_target_has_atomic, integer_atomics))... | 3 | 134 | 232 |
fd59766cb0d35270a178fda1824ad6a778541ce2 | Amanieu d'Antras | 2018-06-21T15:11:39 | Reorganize spinlock array to eliminate false sharing
Fixes #1 | diff --git a/src/fallback.rs b/src/fallback.rs
index 20f1f60..f1d3b84 100644
--- a/src/fallback.rs
+++ b/src/fallback.rs
@@ -10,7 +10,28 @@ use core::num::Wrapping;
use core::ops;
use core::ptr;
use core::slice;
-use core::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};
+use core::sync::atomic::{self, Orderi... | 1 | 27 | 25 |
9b7bb73045bd9d9ba521bc16e96767e3ed6fc4cc | Amanieu d'Antras | 2017-07-07T20:17:22 | Bump version to 0.3.4 | diff --git a/Cargo.toml b/Cargo.toml
index ff9cb26..6843839 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.3.3"
+version = "0.3.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
04e1b4ccb9926ae405a7b00b96d4b680eb19c434 | Vadim Petrochenkov | 2017-07-07T20:12:10 | Fix build on nightly | diff --git a/src/nightly.rs b/src/nightly.rs
index fbe258e..5fdb37f 100644
--- a/src/nightly.rs
+++ b/src/nightly.rs
@@ -10,6 +10,7 @@ use core::ops;
use core::num::Wrapping;
use core::sync::atomic::{AtomicU8, AtomicU16, AtomicU32, AtomicU64, Ordering};
+#[path = "fallback.rs"]
mod fallback;
#[inline]
diff --gi... | 2 | 2 | 0 |
394bba9e46eaa59a16c3785a03379817418c5f58 | Amanieu d'Antras | 2016-05-12T22:03:19 | Bump version to 0.3.3 | diff --git a/Cargo.toml b/Cargo.toml
index 9916954..ff9cb26 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.3.2"
+version = "0.3.3"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
c61c1f21acfba81acc1bde40595cc78894412be0 | Amanieu d'Antras | 2016-05-12T22:02:52 | Use new integer atomic types on nightly instead of intrinsics | diff --git a/src/lib.rs b/src/lib.rs
index 73a93f2..7021aca 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -32,8 +32,8 @@
#![warn(missing_docs)]
#![no_std]
-#![cfg_attr(feature = "nightly", feature(core_intrinsics, const_fn,
- extended_compare_and_swap, cfg_target_has_atomic))]
... | 2 | 99 | 237 |
42ae76c9cb5e7a7a8ef7d4e8314bba286249e2d3 | Amanieu d'Antras | 2016-05-12T21:41:48 | Bump version to 0.3.2 | diff --git a/Cargo.toml b/Cargo.toml
index 74dc088..9916954 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.3.1"
+version = "0.3.2"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
36aeade7f8176a0a02e41e3d761190887314ff43 | Amanieu d'Antras | 2016-05-12T21:40:59 | Fix Atomic<bool> on nightly | diff --git a/src/nightly.rs b/src/nightly.rs
index c6c31ca..e3a223a 100644
--- a/src/nightly.rs
+++ b/src/nightly.rs
@@ -315,13 +315,21 @@ pub unsafe fn atomic_add<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T
{
match mem::size_of::<T>() {
#[cfg(target_has_atomic = "8")]
- 1 => atomic_add_ra... | 1 | 60 | 20 |
a73631511ddc613216942000762a1cf7b010afde | Amanieu d'Antras | 2016-05-12T21:34:55 | Use cfg(target_has_atomic) on nightly | diff --git a/src/lib.rs b/src/lib.rs
index c7a8a82..73a93f2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -32,7 +32,8 @@
#![warn(missing_docs)]
#![no_std]
-#![cfg_attr(feature = "nightly", feature(core_intrinsics, const_fn, extended_compare_and_swap))]
+#![cfg_attr(feature = "nightly", feature(core_intrinsics, const_... | 2 | 68 | 22 |
1fe3064321595e3f0e9998bb7d13e21e747ae3cb | Amanieu d'Antras | 2016-04-02T12:20:15 | Bump version to 0.3.1 | diff --git a/Cargo.toml b/Cargo.toml
index 59621e6..74dc088 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "atomic"
-version = "0.3.0"
+version = "0.3.1"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Generic Atomic<T> wrapper type"
documentation = "https://amanieu.git... | 1 | 1 | 1 |
fa2304e76d051c40383424b4fb2c48446ad042cd | Amanieu d'Antras | 2016-04-02T12:19:02 | Use proper target_arch on x86 | diff --git a/src/lib.rs b/src/lib.rs
index 3d43dfd..c7a8a82 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -344,7 +344,7 @@ mod tests {
assert_eq!(Atomic::<i64>::is_lock_free(),
cfg!(any(target_pointer_width = "64",
all(feature = "nightly",
- ... | 2 | 12 | 12 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 19