Skip to content

Commit 9fac208

Browse files
committed
[Concurrency] Remove libatomic dependency on Concurrency module on Linux
1 parent 0cb305c commit 9fac208

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ endif()
3333
# Frustratingly, in many cases this isn't necessary because the
3434
# sequence is inlined, but we have some code that's just subtle
3535
# enough to turn into runtime calls.
36-
if(SWIFT_HOST_VARIANT STREQUAL "linux" OR
37-
SWIFT_HOST_VARIANT STREQUAL "android")
36+
if(SWIFT_HOST_VARIANT STREQUAL "android")
3837
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_LINK_FLAGS
3938
-latomic)
4039
endif()

stdlib/public/Concurrency/TaskPrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class TaskFutureWaitAsyncContext : public AsyncContext {
159159
} // end anonymous namespace
160160

161161
/// The current state of a task's status records.
162-
class ActiveTaskStatus {
162+
class alignas(sizeof(void*) * 2) ActiveTaskStatus {
163163
enum : uintptr_t {
164164
/// The current running priority of the task.
165165
PriorityMask = 0xFF,

0 commit comments

Comments
 (0)