mirror of
https://github.com/apple/swift-system
synced 2026-11-24 04:38:14 +00:00
Build fix and rename IOResource
This commit is contained in:
1 parent
3760dc265a
commit
a98cd3f2da
2 files changed
+8
-8
No files matched your search
@@ -348,9 +348,9 @@ extension IORequest {
|
||||
) -> IORequest {
|
||||
switch matchAll {
|
||||
case .all:
|
||||
IORequest(core: .cancelFD(flags: IORING_ASYNC_CANCEL_ALL | IORING_ASYNC_CANCEL_FD, targetFD: matchingFileDescriptor))
|
||||
IORequest(core: .cancelFD(flags: IORING_ASYNC_CANCEL_ALL | IORING_ASYNC_CANCEL_FD, targetFD: matching))
|
||||
case .first:
|
||||
IORequest(core: .cancelFD(flags: IORING_ASYNC_CANCEL_ANY | IORING_ASYNC_CANCEL_FD, targetFD: matchingFileDescriptor))
|
||||
IORequest(core: .cancelFD(flags: IORING_ASYNC_CANCEL_ANY | IORING_ASYNC_CANCEL_FD, targetFD: matching))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,9 +360,9 @@ extension IORequest {
|
||||
) -> IORequest {
|
||||
switch matchAll {
|
||||
case .all:
|
||||
IORequest(core: .cancelFDSlot(flags: IORING_ASYNC_CANCEL_ALL | IORING_ASYNC_CANCEL_FD_FIXED, target: matchingFile))
|
||||
IORequest(core: .cancelFDSlot(flags: IORING_ASYNC_CANCEL_ALL | IORING_ASYNC_CANCEL_FD_FIXED, target: matching))
|
||||
case .first:
|
||||
IORequest(core: .cancelFDSlot(flags: IORING_ASYNC_CANCEL_ANY | IORING_ASYNC_CANCEL_FD_FIXED, target: matchingFile))
|
||||
IORequest(core: .cancelFDSlot(flags: IORING_ASYNC_CANCEL_ANY | IORING_ASYNC_CANCEL_FD_FIXED, target: matching))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -624,11 +624,11 @@ public struct IORing: ~Copyable {
|
||||
init(resources: [T]) {
|
||||
self.resources = resources
|
||||
}
|
||||
public subscript(position: Int) -> IOResource<T> {
|
||||
IOResource(resource: resources[position], index: position)
|
||||
public subscript(position: Int) -> RegisteredResource<T> {
|
||||
RegisteredResource(resource: resources[position], index: position)
|
||||
}
|
||||
public subscript(position: UInt16) -> IOResource<T> {
|
||||
IOResource(resource: resources[Int(position)], index: Int(position))
|
||||
public subscript(position: UInt16) -> RegisteredResource<T> {
|
||||
RegisteredResource(resource: resources[Int(position)], index: Int(position))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user