const cpuSetSize … type CPUSet … func schedAffinity(trap uintptr, pid int, set *CPUSet) error { … } // SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. // If pid is 0 the calling thread is used. func SchedGetaffinity(pid int, set *CPUSet) error { … } // SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. // If pid is 0 the calling thread is used. func SchedSetaffinity(pid int, set *CPUSet) error { … } // Zero clears the set s, so that it contains no CPUs. func (s *CPUSet) Zero() { … } func cpuBitsIndex(cpu int) int { … } func cpuBitsMask(cpu int) cpuMask { … } // Set adds cpu to the set s. func (s *CPUSet) Set(cpu int) { … } // Clear removes cpu from the set s. func (s *CPUSet) Clear(cpu int) { … } // IsSet reports whether cpu is in the set s. func (s *CPUSet) IsSet(cpu int) bool { … } // Count returns the number of CPUs in the set s. func (s *CPUSet) Count() int { … }