@@ -45,7 +45,8 @@ extension FileDescriptor {
4545extension FileDescriptor {
4646 /// The desired read and write access for a newly opened file.
4747 @frozen
48- public struct AccessMode : RawRepresentable , Hashable , Codable {
48+ @available ( /*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8 , * )
49+ public struct AccessMode : RawRepresentable , Sendable , Hashable , Codable {
4950 /// The raw C access mode.
5051 @_alwaysEmitIntoClient
5152 public var rawValue : CInt
@@ -87,7 +88,8 @@ extension FileDescriptor {
8788
8889 /// Options that specify behavior for a newly-opened file.
8990 @frozen
90- public struct OpenOptions : OptionSet , Hashable , Codable {
91+ @available ( /*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8 , * )
92+ public struct OpenOptions : OptionSet , Sendable , Hashable , Codable {
9193 /// The raw C options.
9294 @_alwaysEmitIntoClient
9395 public var rawValue : CInt
@@ -311,7 +313,8 @@ extension FileDescriptor {
311313
312314 /// Options for specifying what a file descriptor's offset is relative to.
313315 @frozen
314- public struct SeekOrigin : RawRepresentable , Hashable , Codable {
316+ @available ( /*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8 , * )
317+ public struct SeekOrigin : RawRepresentable , Sendable , Hashable , Codable {
315318 /// The raw C value.
316319 @_alwaysEmitIntoClient
317320 public var rawValue : CInt
@@ -475,18 +478,7 @@ extension FileDescriptor.OpenOptions
475478 public var debugDescription : String { self . description }
476479}
477480
478- #if compiler(>=5.5) && canImport(_Concurrency)
479481// The decision on whether to make FileDescriptor Sendable or not
480482// is currently being discussed in https://github.com/apple/swift-system/pull/112
481483//@available(*, unavailable, message: "File descriptors are not completely thread-safe.")
482484//extension FileDescriptor: Sendable {}
483-
484- @available ( /*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8 , * )
485- extension FileDescriptor . AccessMode : Sendable { }
486-
487- @available ( /*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8 , * )
488- extension FileDescriptor . OpenOptions : Sendable { }
489-
490- @available ( /*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8 , * )
491- extension FileDescriptor . SeekOrigin : Sendable { }
492- #endif
0 commit comments