Skip to content

Commit

Permalink
Missed CPUSet
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasa committed Jan 23, 2025
1 parent 577537a commit 82a0f58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/NIOPosix/LinuxCPUSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand All @@ -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)")
}
Expand Down

0 comments on commit 82a0f58

Please sign in to comment.