Implement sequentially consistent memory ordering for strong references
- Dominant language
- Swift
- Stars
- 1.2k
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
To simplify the initial implementation, atomic references currently treat all orderings as acquire/release, including `.sequentiallyConsistent`. This isn't tenable -- they should at least differentiate between acquire/release and sequentially consistent orderings. Supporting relaxed ordering is less crucial, given that strong references already involve some amount of memory fences.
Note that we don't want to inline the strong reference implementation into user code, so internally each supported ordering must be mapped to its own set of independent entry points. Unfortunately, this will likely involve a measure of code generation. (Another option would be to use relaxed operations and add appropriate fences.)
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating the strong-reference atomic implementation and its ordering mappings, then compare acquire/release handling with the sequentiallyConsistent path. Done means sequentiallyConsistent uses independent entry points instead of the current acquire/release behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100