We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d75acaa commit d32abd8Copy full SHA for d32abd8
Sources/System/IORing/IORing.swift
@@ -10,6 +10,10 @@ import Musl
10
#endif
11
import Synchronization
12
13
+private var ioringSupported: Bool {
14
+ __SWIFT_IORING_SUPPORTED != 0
15
+}
16
+
17
//This was #defines in older headers, so we redeclare it to get a consistent import
18
internal enum RegistrationOps: UInt32 {
19
case registerBuffers = 0
@@ -366,7 +370,7 @@ public struct IORing: ~Copyable {
366
370
367
371
/// Initializes an IORing with enough space for `queueDepth` prepared requests and completed operations
368
372
public init(queueDepth: UInt32, flags: SetupFlags = []) throws(Errno) {
369
- guard __SWIFT_IORING_SUPPORTED != 0 else {
373
+ guard ioringSupported else {
374
throw Errno.notSupported
375
}
376
0 commit comments