Commit Graph

21 Commits

Author SHA1 Message Date
Sarunas 21835cd4fa Drop enum for constants 2026-04-30 17:35:37 +02:00
Sarunas cbf27f497b Move docs, remove old _spin variable 2026-04-28 21:25:23 +03:00
Sarunas e4b1283837 clarify why attempting to do CAS after spin 2026-04-24 20:56:15 +02:00
Sarunas 62632bf9a7 PR feedback 2026-04-22 22:20:08 +03:00
Sarunas 8c1e266155 Restore some existing comments and style 2026-04-21 11:58:10 +03:00
Sarunas ac04173f5e Update 2026-04-20 16:09:40 +03:00
Sarunas 8705100af3 Adaptive Synchronization Linux spinning 2026-04-17 17:24:45 +03:00
Danny Canter 36b6b96a72 Synchronization: Add errno to some linux lock fatalErrors
In the comments it's stated that these errnos can't really occur for
the implementation, but unfortunately they have been seen in some
scenarios. To aide in debugging, it'd be nice to at least have the
errno in the error message.
2025-11-27 15:01:19 -08:00
Jonathan Grynspan 276706eceb Don't abort on Linux if withLockIfAvailable() is called recursively. (#85448)
On all platforms except Linux, calling `withLockIfAvailable()`
recursively just returns `nil`. However, our Linux implementation
chooses to abort the process instead. We don't need this
inconsistent/destructive behaviour and can just return `nil` as we do
elsewhere.
2025-11-11 23:34:12 -08:00
Allan Shortlidge 008efc432f stdlib: Fix missing unsafe operators in more places.
Add `unsafe` where it is still missing. I missed these in previous passes due
to conditional compilation.
2025-06-22 18:46:57 -07:00
Evan Wilde cae88d3344 Fix add_swift_target_library for the static SDK
add_swift_target_library was missing pieces for passing sources and
flags to the static SDK build. As a result, the static SDK was missing
pieces (specifically Mutex).

Also adding the Musl import to the Linux Mutex implementation.
2024-08-13 15:59:31 -07:00
Alexander Cyon c21b1e68fd [stdlib] Fix typos 2024-07-06 13:09:57 +02:00
Alex Lorenz 74d2a66a27 [androd] Fix Synchronization Android build
Add Android import for Mutex implementation
2024-06-05 16:58:05 -07:00
Alejandro Alonso 66ec7abd54 Underscore some things, add explicit internal
Fix some compile issues
2024-06-04 09:06:37 -07:00
Alejandro Alonso fbfb218d11 Update LinuxImpl.swift 2024-06-04 09:06:37 -07:00
Alejandro Alonso 3a115fc290 Properly handle the syscalls on Linux and do some spins
fix some stuff
2024-06-04 09:06:37 -07:00
Alejandro Alonso 92e6a989b2 Cache TID in TLS on Linux 2024-06-04 09:06:36 -07:00
Alejandro Alonso 5b7e3d8ca2 Add a WasmMutex 2024-06-04 09:06:36 -07:00
Alejandro Alonso 882568ca4d Directly call gettid syscall instead of library function 2024-06-04 09:06:36 -07:00
Alejandro Alonso 1f206ec58e Attempt to release the lock and wake when we can't 2024-06-04 09:06:36 -07:00
Alejandro Alonso 2a60c88457 Implement Mutex in Synchronization 2024-06-04 09:06:34 -07:00