mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
unix: fix cpuset size argument in sched_affinity syscall
Fixes golang/go#23639 Change-Id: I7793dc50de35791a7c8af1966bb2ee4a36a2ac1c Reviewed-on: https://go-review.googlesource.com/91375 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
3dbebcf8ef
commit
8f27ce8a60
@@ -16,7 +16,7 @@ const cpuSetSize = _CPU_SETSIZE / _NCPUBITS
|
||||
type CPUSet [cpuSetSize]cpuMask
|
||||
|
||||
func schedAffinity(trap uintptr, pid int, set *CPUSet) error {
|
||||
_, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(set)), uintptr(unsafe.Pointer(set)))
|
||||
_, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set)))
|
||||
if e != 0 {
|
||||
return errnoErr(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user