Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic Atomic<T> type #8

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add generic Atomic<T> type #8

wants to merge 1 commit into from

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Mar 21, 2022

Note: this patch currently adds generic atomic type to the main portable-atomic crate, but should be to the portable-atomic-util crate.

  • Support for various operations on Copy types and support for swap and store on non-Copy types.
  • Support for primitives, immutable references, function pointers, NonNull, NoneZero, etc.
  • Support for user-defined structs and enums, including those with multiple fields and padding. (via #[derive(Atomicable)])
  • Support for user-defined unions. (via #[derive(Atomicable)])

This should meet the requirements that I said in #1.

Requirements:

Closes #1

@taiki-e taiki-e force-pushed the generic branch 6 times, most recently from ab2a285 to da35a39 Compare March 25, 2022 16:11
src/generic/mod.rs Outdated Show resolved Hide resolved
@taiki-e taiki-e force-pushed the generic branch 2 times, most recently from 318ea8e to bf30a6e Compare March 25, 2022 19:26
@taiki-e taiki-e force-pushed the generic branch 3 times, most recently from f4b7e57 to d876bf3 Compare May 1, 2022 07:03
@taiki-e taiki-e force-pushed the generic branch 2 times, most recently from 06262ed to bbfda0a Compare July 8, 2022 13:46
bors bot added a commit that referenced this pull request Sep 12, 2022
38: Add empty portable-atomic-util crate r=taiki-e a=taiki-e

This adds an empty crate named `portable-atomic-util`.

For now, I'm considering putting the features proposed in #1 (#8) and #37 into this crate, but they may be merged into the main `portable-atomic` crate in the future.


Co-authored-by: Taiki Endo <[email protected]>
@taiki-e taiki-e added the A-portable-atomic-util Area: related to portable-atomic-util crate label Jan 12, 2023
@taiki-e taiki-e force-pushed the main branch 2 times, most recently from a4d8248 to 6d90a3d Compare July 29, 2023 08:13
@taiki-e taiki-e force-pushed the main branch 3 times, most recently from 023c526 to fc902d0 Compare September 20, 2024 12:53
@taiki-e taiki-e force-pushed the main branch 10 times, most recently from 51d5755 to a68d11b Compare October 4, 2024 21:07
@taiki-e taiki-e force-pushed the main branch 5 times, most recently from 6035b03 to 33b6cb5 Compare October 19, 2024 11:51
@taiki-e taiki-e force-pushed the main branch 3 times, most recently from c49dd72 to b4a720e Compare October 27, 2024 05:30
@taiki-e taiki-e force-pushed the main branch 3 times, most recently from 8813362 to 33ab2c1 Compare November 23, 2024 17:40
@taiki-e taiki-e force-pushed the main branch 5 times, most recently from c05229d to 9d65f58 Compare January 7, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-portable-atomic-util Area: related to portable-atomic-util crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provides generic Atomic<T> type
1 participant