mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-30 04:58:44 +00:00
Add support for FreeBSD (#375)
* Add partial support for FreeBSD This change will allow `swift build` to succeed. However, SwiftPM support is still incomplete and does not yet allow adding `.freebsd` to `.when(platforms:)`, so `swift test` cannot be executed. * Make `swift test` work on FreeBSD
This commit is contained in:
1 parent
2de50036f6
commit
b8006a9de0
3 files changed
+8
No files matched your search
@@ -34,7 +34,11 @@ internal struct Lock {
|
||||
#if canImport(Darwin)
|
||||
typealias Primitive = os_unfair_lock
|
||||
#elseif canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
#if os(FreeBSD) || os(OpenBSD)
|
||||
typealias Primitive = pthread_mutex_t?
|
||||
#else
|
||||
typealias Primitive = pthread_mutex_t
|
||||
#endif
|
||||
#elseif canImport(WASILibc)
|
||||
// This WASILibc variation is single threaded, provides no locks
|
||||
#elseif canImport(WinSDK)
|
||||
|
||||
Reference in new issue
Block a user