From 82a0f5833a63d79c4ee85deefc36361fc2c2fb6d Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 23 Jan 2025 14:29:57 +0000 Subject: [PATCH] Missed CPUSet --- Sources/NIOPosix/LinuxCPUSet.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/NIOPosix/LinuxCPUSet.swift b/Sources/NIOPosix/LinuxCPUSet.swift index 6e4af51c42..4ca63931dd 100644 --- a/Sources/NIOPosix/LinuxCPUSet.swift +++ b/Sources/NIOPosix/LinuxCPUSet.swift @@ -52,7 +52,7 @@ extension NIOThread { CNIOLinux_CPU_ZERO(&cpuset) let res = self.withUnsafeThreadHandle { p in - CNIOLinux_pthread_getaffinity_np(p, MemoryLayout.size(ofValue: cpuset), &cpuset) + CNIOLinux_pthread_getaffinity_np(p.handle, MemoryLayout.size(ofValue: cpuset), &cpuset) } precondition(res == 0, "pthread_getaffinity_np failed: \(res)") @@ -75,7 +75,7 @@ extension NIOThread { CNIOLinux_CPU_SET(CInt(cpuID), &cpuset) } let res = self.withUnsafeThreadHandle { p in - CNIOLinux_pthread_setaffinity_np(p, MemoryLayout.size(ofValue: cpuset), &cpuset) + CNIOLinux_pthread_setaffinity_np(p.handle, MemoryLayout.size(ofValue: cpuset), &cpuset) } precondition(res == 0, "pthread_setaffinity_np failed: \(res)") }