Skip to content

Commit de449c9

Browse files
Carl PetoCarl Peto
authored andcommitted
revert atomics for now
1 parent 3c65c79 commit de449c9

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

stdlib/public/core/AtomicInt.swift.gyb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ internal func _swift_stdlib_atomicCompareExchangeStrongInt(
7474
#elseif _pointerBitWidth(_32)
7575
let (oldValue, won) = Builtin.cmpxchg_seqcst_seqcst_Int32(
7676
target._rawValue, expected.pointee._value, desired._value)
77-
#elseif _pointerBitWidth(_16)
78-
let (oldValue, won) = Builtin.cmpxchg_seqcst_seqcst_Int16(
79-
target._rawValue, expected.pointee._value, desired._value)
8077
#else
8178
#error("Unknown platform")
8279
#endif
@@ -96,9 +93,6 @@ func _swift_stdlib_atomicLoadInt(
9693
#elseif _pointerBitWidth(_32)
9794
let value = Builtin.atomicload_seqcst_Int32(target._rawValue)
9895
return Int(value)
99-
#elseif _pointerBitWidth(_16)
100-
let value = Builtin.atomicload_seqcst_Int16(target._rawValue)
101-
return Int(value)
10296
#else
10397
#error("Unknown platform")
10498
#endif
@@ -112,8 +106,6 @@ internal func _swift_stdlib_atomicStoreInt(
112106
Builtin.atomicstore_seqcst_Int64(target._rawValue, desired._value)
113107
#elseif _pointerBitWidth(_32)
114108
Builtin.atomicstore_seqcst_Int32(target._rawValue, desired._value)
115-
#elseif _pointerBitWidth(_16)
116-
Builtin.atomicstore_seqcst_Int16(target._rawValue, desired._value)
117109
#else
118110
#error("Unknown platform")
119111
#endif
@@ -136,17 +128,13 @@ func _swift_stdlib_atomicFetch${operation}Int(
136128
let value = _swift_stdlib_atomicFetch${operation}Int32(
137129
object: rawTarget.assumingMemoryBound(to: Int32.self),
138130
operand: Int32(operand))
139-
#elseif _pointerBitWidth(_16)
140-
let value = _swift_stdlib_atomicFetch${operation}Int16(
141-
object: rawTarget.assumingMemoryBound(to: Int16.self),
142-
operand: Int16(operand))
143131
#else
144132
#error("Unknown platform")
145133
#endif
146134
return Int(value)
147135
}
148136

149-
% for bits in [ 16, 32, 64 ]:
137+
% for bits in [ 32, 64 ]:
150138

151139
// Warning: no overflow checking.
152140
@usableFromInline // used by SwiftPrivate._stdlib_AtomicInt

0 commit comments

Comments
 (0)