From 565e7169c424711eebb75b70df052a2a912ec455 Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Sat, 16 Mar 2024 10:10:12 -0400 Subject: [PATCH] Update cpu.go --- thread/cpu.go | 1 + 1 file changed, 1 insertion(+) diff --git a/thread/cpu.go b/thread/cpu.go index 03ae1e7..d4da550 100644 --- a/thread/cpu.go +++ b/thread/cpu.go @@ -24,6 +24,7 @@ func init() { //cpu core 1 == 2 func SetCPUAffinity(cpu uint16) error { var newMask unix.CPUSet + newMask.Zero() newMask.Set(int(cpu) - 1) return unix.SchedSetaffinity(0, &newMask) }