Build fix and rename IOResource

This commit is contained in:
David Smith committed 2025-04-21 23:47:00 +00:00
1 parent 3760dc265a
commit a98cd3f2da
2 files changed
+8 -8

No files matched your search

+4 -4
View File
@@ -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))
}
}
+4 -4
View File
@@ -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))
}
}