Skip to content

Commit

Permalink
Merge pull request #20 from lorentey/watchOS-warning-fix
Browse files Browse the repository at this point in the history
DoubleWord._readersBitWidth: Switch to using Int.bitWidth
  • Loading branch information
lorentey authored Jan 27, 2021
2 parents df9f811 + 09ddcdd commit 3e95ba3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Sources/Atomics/AtomicStrongReference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3e95ba3

Please sign in to comment.