Skip to content

Commit c21b1e6

Browse files
committed
[stdlib] Fix typos
1 parent d5b4a17 commit c21b1e6

File tree

33 files changed

+82
-82
lines changed

33 files changed

+82
-82
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ function(_compile_swift_files
596596
list(APPEND swift_flags "-swift-version" "5")
597597
endif()
598598

599-
# Avoiding emiting ABI descriptor files while building stdlib.
599+
# Avoiding emitting ABI descriptor files while building stdlib.
600600
if (SWIFTFILE_IS_STDLIB)
601601
list(APPEND swift_flags "-Xfrontend" "-empty-abi-descriptor")
602602
endif()

stdlib/include/llvm/ADT/STLExtras.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@ make_filter_range(RangeT &&Range, PredicateT Pred) {
529529
/// somewhere between them. The constraints of these iterators are:
530530
///
531531
/// - On construction or after being incremented, it is comparable and
532-
/// dereferencable. It is *not* incrementable.
533-
/// - After being dereferenced, it is neither comparable nor dereferencable, it
532+
/// dereferenceable. It is *not* incrementable.
533+
/// - After being dereferenced, it is neither comparable nor dereferenceable, it
534534
/// is only incrementable.
535535
///
536536
/// This means you can only dereference the iterator once, and you can only

stdlib/include/llvm/Support/MathExtras.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ std::enable_if_t<std::is_signed<T>::value, T> AddOverflow(T X, T Y, T &Result) {
906906
}
907907

908908
/// Subtract two signed integers, computing the two's complement truncated
909-
/// result, returning true if an overflow ocurred.
909+
/// result, returning true if an overflow occurred.
910910
template <typename T>
911911
std::enable_if_t<std::is_signed<T>::value, T> SubOverflow(T X, T Y, T &Result) {
912912
#if __has_builtin(__builtin_sub_overflow)
@@ -932,7 +932,7 @@ std::enable_if_t<std::is_signed<T>::value, T> SubOverflow(T X, T Y, T &Result) {
932932
}
933933

934934
/// Multiply two signed integers, computing the two's complement truncated
935-
/// result, returning true if an overflow ocurred.
935+
/// result, returning true if an overflow occurred.
936936
template <typename T>
937937
std::enable_if_t<std::is_signed<T>::value, T> MulOverflow(T X, T Y, T &Result) {
938938
// Perform the unsigned multiplication on absolute values.

stdlib/private/StdlibUnicodeUnittest/WordBreaking.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
// Normalization tests are currently only avaible on Darwin, awaiting a sensible
13+
// Normalization tests are currently only available on Darwin, awaiting a sensible
1414
// file API...
1515
#if _runtime(_ObjC)
1616
import Foundation

stdlib/private/SwiftPrivate/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ set(swift_swiftprivate_compile_flags
33
"-Xfrontend" "-disable-access-control")
44

55
if(SWIFT_BUILD_SDK_OVERLAY)
6-
set(swift_swiftprivate_darwin_depencencies Darwin)
6+
set(swift_swiftprivate_darwin_dependencies Darwin)
77
else()
8-
set(swift_swiftprivate_darwin_depencencies)
8+
set(swift_swiftprivate_darwin_dependencies)
99
endif()
1010

1111
add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
@@ -21,11 +21,11 @@ add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
2121
GYB_SOURCES
2222
AtomicInt.swift.gyb
2323

24-
SWIFT_MODULE_DEPENDS_OSX ${swift_swiftprivate_darwin_depencencies}
25-
SWIFT_MODULE_DEPENDS_IOS ${swift_swiftprivate_darwin_depencencies}
26-
SWIFT_MODULE_DEPENDS_TVOS ${swift_swiftprivate_darwin_depencencies}
27-
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_swiftprivate_darwin_depencencies}
28-
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_swiftprivate_darwin_depencencies}
24+
SWIFT_MODULE_DEPENDS_OSX ${swift_swiftprivate_darwin_dependencies}
25+
SWIFT_MODULE_DEPENDS_IOS ${swift_swiftprivate_darwin_dependencies}
26+
SWIFT_MODULE_DEPENDS_TVOS ${swift_swiftprivate_darwin_dependencies}
27+
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_swiftprivate_darwin_dependencies}
28+
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_swiftprivate_darwin_dependencies}
2929
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
3030
SWIFT_MODULE_DEPENDS_ANDROID Android
3131
SWIFT_MODULE_DEPENDS_LINUX Glibc

stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ else()
1515
endif()
1616

1717
if(SWIFT_BUILD_SDK_OVERLAY)
18-
set(swift_private_libc_extras_darwin_depencencies Darwin)
18+
set(swift_private_libc_extras_darwin_dependencies Darwin)
1919
else()
20-
set(swift_private_libc_extras_darwin_depencencies)
20+
set(swift_private_libc_extras_darwin_dependencies)
2121
endif()
2222

2323
add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
@@ -31,12 +31,12 @@ add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUIL
3131

3232
SWIFT_MODULE_DEPENDS SwiftPrivate
3333
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS} ${swift_private_libc_extras_flags}
34-
SWIFT_MODULE_DEPENDS_OSX ${swift_private_libc_extras_darwin_depencencies}
35-
SWIFT_MODULE_DEPENDS_IOS ${swift_private_libc_extras_darwin_depencencies}
36-
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_libc_extras_darwin_depencencies}
37-
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_libc_extras_darwin_depencencies}
38-
SWIFT_MODULE_DEPENDS_XROS ${swift_private_libc_extras_darwin_depencencies}
39-
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_libc_extras_darwin_depencencies}
34+
SWIFT_MODULE_DEPENDS_OSX ${swift_private_libc_extras_darwin_dependencies}
35+
SWIFT_MODULE_DEPENDS_IOS ${swift_private_libc_extras_darwin_dependencies}
36+
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_libc_extras_darwin_dependencies}
37+
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_libc_extras_darwin_dependencies}
38+
SWIFT_MODULE_DEPENDS_XROS ${swift_private_libc_extras_darwin_dependencies}
39+
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_libc_extras_darwin_dependencies}
4040
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
4141
SWIFT_MODULE_DEPENDS_ANDROID Android
4242
SWIFT_MODULE_DEPENDS_LINUX Glibc

stdlib/private/SwiftPrivateLibcExtras/Subprocess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ int _stdlib_posix_spawn(pid_t *__restrict pid, const char * __restrict path,
5454
return posix_spawn(pid, path, file_actions, attrp, argv, envp);
5555
}
5656

57-
#endif // !defined(__ANDROID__) && !defined(__HAIKU__) && (!defined(_WIN32) || defined(__CGYWIN__)) && !defined(__wasi__)
57+
#endif // !defined(__ANDROID__) && !defined(__HAIKU__) && (!defined(_WIN32) || defined(__CYGWIN__)) && !defined(__wasi__)
5858

stdlib/private/SwiftPrivateThreadExtras/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
if(SWIFT_BUILD_SDK_OVERLAY)
2-
set(swift_private_thread_extras_darwin_depencencies Darwin)
2+
set(swift_private_thread_extras_darwin_dependencies Darwin)
33
else()
4-
set(swift_private_thread_extras_darwin_depencencies)
4+
set(swift_private_thread_extras_darwin_dependencies)
55
endif()
66

77
add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
@@ -12,12 +12,12 @@ add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BU
1212

1313
"${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"
1414

15-
SWIFT_MODULE_DEPENDS_IOS ${swift_private_thread_extras_darwin_depencencies}
16-
SWIFT_MODULE_DEPENDS_OSX ${swift_private_thread_extras_darwin_depencencies}
17-
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_thread_extras_darwin_depencencies}
18-
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_thread_extras_darwin_depencencies}
19-
SWIFT_MODULE_DEPENDS_XROS ${swift_private_thread_extras_darwin_depencencies}
20-
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_thread_extras_darwin_depencencies}
15+
SWIFT_MODULE_DEPENDS_IOS ${swift_private_thread_extras_darwin_dependencies}
16+
SWIFT_MODULE_DEPENDS_OSX ${swift_private_thread_extras_darwin_dependencies}
17+
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_thread_extras_darwin_dependencies}
18+
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_thread_extras_darwin_dependencies}
19+
SWIFT_MODULE_DEPENDS_XROS ${swift_private_thread_extras_darwin_dependencies}
20+
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_thread_extras_darwin_dependencies}
2121
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
2222
SWIFT_MODULE_DEPENDS_ANDROID Android
2323
SWIFT_MODULE_DEPENDS_LINUX Glibc

stdlib/private/SwiftReflectionTest/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
if(SWIFT_BUILD_SDK_OVERLAY)
2-
set(swift_reflection_test_darwin_depencencies Darwin)
2+
set(swift_reflection_test_darwin_dependencies Darwin)
33
else()
4-
set(swift_reflection_test_darwin_depencencies)
4+
set(swift_reflection_test_darwin_dependencies)
55
endif()
66

77
if (SWIFT_INCLUDE_TESTS AND SWIFT_BUILD_DYNAMIC_STDLIB)
88
add_swift_target_library(swiftSwiftReflectionTest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
99
SwiftReflectionTest.swift
1010
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
1111
SWIFT_COMPILE_FLAGS_LINUX -Xcc -D_GNU_SOURCE
12-
SWIFT_MODULE_DEPENDS_OSX ${swift_reflection_test_darwin_depencencies}
13-
SWIFT_MODULE_DEPENDS_IOS ${swift_reflection_test_darwin_depencencies}
14-
SWIFT_MODULE_DEPENDS_TVOS ${swift_reflection_test_darwin_depencencies}
15-
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_reflection_test_darwin_depencencies}
16-
SWIFT_MODULE_DEPENDS_XROS ${swift_reflection_test_darwin_depencencies}
12+
SWIFT_MODULE_DEPENDS_OSX ${swift_reflection_test_darwin_dependencies}
13+
SWIFT_MODULE_DEPENDS_IOS ${swift_reflection_test_darwin_dependencies}
14+
SWIFT_MODULE_DEPENDS_TVOS ${swift_reflection_test_darwin_dependencies}
15+
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_reflection_test_darwin_dependencies}
16+
SWIFT_MODULE_DEPENDS_XROS ${swift_reflection_test_darwin_dependencies}
1717
SWIFT_MODULE_DEPENDS_ANDROID Android
1818
SWIFT_MODULE_DEPENDS_LINUX Glibc
1919
SWIFT_MODULE_DEPENDS_LINUX_STATIC Musl

stdlib/public/Concurrency/Actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ class DefaultActorImpl
11951195
/// It can be done when actor transitions from Idle to Scheduled or
11961196
/// when actor gets a priority override and we schedule a stealer.
11971197
///
1198-
/// When the task executor is `undefined` ths task will be scheduled on the
1198+
/// When the task executor is `undefined` the task will be scheduled on the
11991199
/// default global executor.
12001200
void scheduleActorProcessJob(JobPriority priority, TaskExecutorRef taskExecutor);
12011201

stdlib/public/Concurrency/CheckedContinuation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ extension CheckedContinuation {
267267
/// indefinitely which will result in the task "hanging" as well as being leaked with
268268
/// no possibility to destroy it.
269269
///
270-
/// The checked continuation offers detection of mis-use, and dropping the last reference
270+
/// The checked continuation offers detection of misuse, and dropping the last reference
271271
/// to it, without having resumed it will trigger a warning. Resuming a continuation twice
272272
/// is also diagnosed and will cause a crash.
273273
///
@@ -328,7 +328,7 @@ internal func __abi_withCheckedContinuation<T>(
328328
/// indefinitely which will result in the task "hanging" as well as being leaked with
329329
/// no possibility to destroy it.
330330
///
331-
/// The checked continuation offers detection of mis-use, and dropping the last reference
331+
/// The checked continuation offers detection of misuse, and dropping the last reference
332332
/// to it, without having resumed it will trigger a warning. Resuming a continuation twice
333333
/// is also diagnosed and will cause a crash.
334334
///

stdlib/public/Concurrency/Deque/_UnsafeWrappedBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ extension _UnsafeMutableWrappedBuffer {
153153
// Note: Array._copyContents traps when not given enough space, so we
154154
// need to check if we have enough contiguous space available above.
155155
//
156-
// FIXME: Add suppport for segmented (a.k.a. piecewise contiguous)
156+
// FIXME: Add support for segmented (a.k.a. piecewise contiguous)
157157
// collections to the stdlib.
158158
var (it, copied) = elements._copyContents(initializing: first)
159159
if copied == first.count, let second = second {

stdlib/public/Concurrency/TaskGroup+TaskExecutor.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extension TaskGroup {
7070
///
7171
/// - Parameters:
7272
/// - taskExecutor: The task executor that the child task should be started on and keep using.
73-
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
73+
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
7474
/// will be ignored. In order to inherit the parent task's executor preference
7575
/// invoke `addTaskUnlessCancelled()` without passing a value to the `taskExecutor` parameter,
7676
/// and it will be inherited automatically.
@@ -135,7 +135,7 @@ extension ThrowingTaskGroup {
135135
///
136136
/// - Parameters:
137137
/// - taskExecutor: The task executor that the child task should be started on and keep using.
138-
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
138+
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
139139
/// will be ignored. In order to inherit the parent task's executor preference
140140
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
141141
/// and it will be inherited automatically.
@@ -245,7 +245,7 @@ extension DiscardingTaskGroup {
245245
///
246246
/// - Parameters:
247247
/// - taskExecutor: The task executor that the child task should be started on and keep using.
248-
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
248+
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
249249
/// will be ignored. In order to inherit the parent task's executor preference
250250
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
251251
/// and it will be inherited automatically.
@@ -295,7 +295,7 @@ extension DiscardingTaskGroup {
295295
///
296296
/// - Parameters:
297297
/// - taskExecutor: The task executor that the child task should be started on and keep using.
298-
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
298+
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
299299
/// will be ignored. In order to inherit the parent task's executor preference
300300
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
301301
/// and it will be inherited automatically.
@@ -360,7 +360,7 @@ extension ThrowingDiscardingTaskGroup {
360360
///
361361
/// - Parameters:
362362
/// - taskExecutor: The task executor that the child task should be started on and keep using.
363-
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
363+
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
364364
/// will be ignored. In order to inherit the parent task's executor preference
365365
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
366366
/// and it will be inherited automatically.
@@ -410,7 +410,7 @@ extension ThrowingDiscardingTaskGroup {
410410
///
411411
/// - Parameters:
412412
/// - taskExecutor: The task executor that the child task should be started on and keep using.
413-
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
413+
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
414414
/// will be ignored. In order to inherit the parent task's executor preference
415415
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
416416
/// and it will be inherited automatically.

stdlib/public/Distributed/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#===----------------------------------------------------------------------===#
1212

1313
if(SWIFT_BUILD_SDK_OVERLAY)
14-
set(swift_distributed_darwin_depencencies Darwin)
14+
set(swift_distributed_darwin_dependencies Darwin)
1515
else()
16-
set(swift_distributed_darwin_depencencies)
16+
set(swift_distributed_darwin_dependencies)
1717
endif()
1818

1919
set(swift_distributed_link_libraries
@@ -30,10 +30,10 @@ add_swift_target_library(swiftDistributed ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS
3030
DistributedMetadata.swift
3131
LocalTestingDistributedActorSystem.swift
3232

33-
SWIFT_MODULE_DEPENDS_IOS ${swift_distributed_darwin_depencencies}
34-
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_depencencies}
35-
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_depencencies}
36-
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_distributed_darwin_depencencies}
33+
SWIFT_MODULE_DEPENDS_IOS ${swift_distributed_darwin_dependencies}
34+
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_dependencies}
35+
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_dependencies}
36+
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_distributed_darwin_dependencies}
3737
SWIFT_MODULE_DEPENDS_ANDROID Android
3838
SWIFT_MODULE_DEPENDS_LINUX Glibc
3939
SWIFT_MODULE_DEPENDS_FREEBSD Glibc

stdlib/public/Distributed/DistributedActor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ extension DistributedActor /*: implicitly Decodable */ where Self.ID: Decodable
325325
/// on, in order to obtain the instance this initializer should return.
326326
///
327327
/// - Parameter decoder: used to decode the ``ID`` of this distributed actor.
328-
/// - Throws: If the actor system value in `decoder.userInfo` is missing or mis-typed;
328+
/// - Throws: If the actor system value in `decoder.userInfo` is missing or mistyped;
329329
/// the `ID` fails to decode from the passed `decoder`;
330330
// or if the ``DistributedActor/resolve(id:using:)`` method invoked by this initializer throws.
331331
nonisolated public init(from decoder: Decoder) throws {

stdlib/public/Platform/android.modulemap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// The module map for the Android NDK.
1313
// A portion of the modules in this file are prefixed
1414
// with an underscore, to discourage users from importing them from
15-
// Swift directly, as these modules might be overriden by the C++ stdlib.
15+
// Swift directly, as these modules might be overridden by the C++ stdlib.
1616
// Instead, users should import 'Android' or another
1717
// umbrella module that includes these headers.
1818

stdlib/public/RemoteInspection/TypeRef.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ class DemanglingForTypeRef
895895
node->addChild(MemberId, Dem);
896896
} else {
897897
// Otherwise, build up a DependentAssociatedTR node with
898-
// the member Identifer and protocol
898+
// the member Identifier and protocol
899899
auto AssocTy = Dem.createNode(Node::Kind::DependentAssociatedTypeRef);
900900
AssocTy->addChild(MemberId, Dem);
901901
auto Proto = Dem.demangleType(MangledProtocol);

stdlib/public/Synchronization/Atomics/AtomicMemoryOrderings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ extension AtomicUpdateOrdering {
245245
/// An acquiring update synchronizes with a releasing operation
246246
/// whose value its reads. It ensures that the releasing and
247247
/// acquiring threads agree that all subsequent variable accesses on
248-
/// the acquring thread happen after the atomic operation itself.
248+
/// the acquiring thread happen after the atomic operation itself.
249249
///
250250
/// This value corresponds to `std::memory_order_acquire` in C++.
251251
@available(SwiftStdlib 6.0, *)

stdlib/public/Synchronization/Mutex/LinuxImpl.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ import Glibc
1919

2020
extension Atomic where Value == UInt32 {
2121
// This returns 'false' on success and 'true' on error. Check 'errno' for the
22-
// specifc error value.
22+
// specific error value.
2323
internal borrowing func _futexLock() -> UInt32 {
2424
_swift_stdlib_futex_lock(.init(_rawAddress))
2525
}
2626

2727
// This returns 'false' on success and 'true' on error. Check 'errno' for the
28-
// specifc error value.
28+
// specific error value.
2929
internal borrowing func _futexTryLock() -> UInt32 {
3030
_swift_stdlib_futex_trylock(.init(_rawAddress))
3131
}
@@ -189,7 +189,7 @@ extension _MutexHandle {
189189
// ESRCH - "The thread ID in the futex word at uaddr does not exist."
190190
default:
191191
// TODO: Replace with a colder function / one that takes a StaticString
192-
fatalError("Unknown error occured while attempting to acquire a Mutex")
192+
fatalError("Unknown error occurred while attempting to acquire a Mutex")
193193
}
194194
}
195195
}
@@ -359,7 +359,7 @@ extension _MutexHandle {
359359
// space.)"
360360
default:
361361
// TODO: Replace with a colder function / one that takes a StaticString
362-
fatalError("Unknown error occured while attempting to release a Mutex")
362+
fatalError("Unknown error occurred while attempting to release a Mutex")
363363
}
364364
}
365365
}

stdlib/public/Synchronization/Mutex/Mutex.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/// class Manager {
2525
/// let cache = Mutex<[Key: Resource]>([:])
2626
///
27-
/// func saveResouce(_ resource: Resouce, as key: Key) {
27+
/// func saveResource(_ resource: Resource, as key: Key) {
2828
/// cache.withLock {
2929
/// $0[key] = resource
3030
/// }
@@ -57,7 +57,7 @@ extension Mutex: @unchecked Sendable where Value: ~Copyable {}
5757

5858
@available(SwiftStdlib 6.0, *)
5959
extension Mutex where Value: ~Copyable {
60-
/// Calls the given closure after acquring the lock and then releases
60+
/// Calls the given closure after acquiring the lock and then releases
6161
/// ownership.
6262
///
6363
/// This method is equivalent to the following sequence of code:

0 commit comments

Comments
 (0)