mirror of
https://github.com/apple/swift-atomics
synced 2026-11-29 05:04:21 +00:00
DoubleWord._readersBitWidth: Switch to using Int.bitWidth
This fixes a spurious warning about `arch(arm64_32)` emitted by swift.org compiler builds. Resolves #19
This commit is contained in:
1 parent
df9f811f19
commit
09ddcdd88d
1 file changed
+3
-5
@@ -79,11 +79,9 @@ extension DoubleWord {
|
||||
|
||||
@inline(__always)
|
||||
fileprivate static var _readersBitWidth: Int {
|
||||
#if arch(i386) || arch(arm) || arch(arm64_32)
|
||||
return 8
|
||||
#else
|
||||
return 16
|
||||
#endif
|
||||
// This reserves 8 bits for the accesses-in-flight counter on 32-bit
|
||||
// systems, and 16 bits on 64-bit systems.
|
||||
Int.bitWidth / 4
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
|
||||
Reference in new issue
Block a user