Skip to content

Commit ee34dc1

Browse files
committed
Make a couple internal functions back public
1 parent 113b7a5 commit ee34dc1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

stdlib/public/core/AtomicInt.swift.gyb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ internal func _swift_stdlib_atomicCompareExchangeStrongInt(
7272
}
7373

7474

75-
@usableFromInline // used by SwiftPrivate._stdlib_AtomicInt
76-
internal func _swift_stdlib_atomicLoadInt(
75+
// FIXME: ideally it should not be here, at the very least not public, but
76+
// @usableFromInline internal to be used by SwiftPrivate._stdlib_AtomicInt
77+
public // Existing uses outside stdlib
78+
func _swift_stdlib_atomicLoadInt(
7779
object target: UnsafeMutablePointer<Int>) -> Int {
7880
#if arch(i386) || arch(arm) || arch(arm64_32)
7981
let value = Builtin.atomicload_seqcst_Int32(target._rawValue)
@@ -97,8 +99,10 @@ internal func _swift_stdlib_atomicStoreInt(
9799

98100
% for operation in ['Add', 'And', 'Or', 'Xor']:
99101
// Warning: no overflow checking.
100-
@usableFromInline // used by SwiftPrivate._stdlib_AtomicInt
101-
internal func _swift_stdlib_atomicFetch${operation}Int(
102+
// FIXME: ideally it should not be here, at the very least not public, but
103+
// @usableFromInline internal to be used by SwiftPrivate._stdlib_AtomicInt
104+
public // Existing uses outside stdlib
105+
func _swift_stdlib_atomicFetch${operation}Int(
102106
object target: UnsafeMutablePointer<Int>,
103107
operand: Int) -> Int {
104108
let rawTarget = UnsafeMutableRawPointer(target)

0 commit comments

Comments
 (0)