mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 06:16:41 -04:00
unix: add SetMemPolicy and its mode/flag values
This reuses CPUSet type as it fits perfectly. No GetMemPolicy support yet. Change-Id: I549361bc1ed95ee73fd38d00277ec0f9f348a9ba Reviewed-on: https://go-review.googlesource.com/c/sys/+/706917 Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Antti Kervinen <antti.kervinen@gmail.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
committed by
Gopher Robot
parent
b731f782ac
commit
28c5bda5d4
@@ -2238,3 +2238,13 @@ func Mseal(b []byte, flags uint) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func setMemPolicy(mode int, mask *CPUSet, size int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(unsafe.Pointer(mask)), uintptr(size))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user