aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/syscall.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-12 01:14:03 +0900
committerOphestra <cat@gensokyo.uk>2026-03-12 01:14:03 +0900
commit196b200d0f19c41730db439c62db9b39e424f21f (patch)
tree0723b900cea0816b6501f3933f768fb75453dd49 /container/syscall.go
parent04e6bc3c5c99d6a99f17cfa5f69f34fe8941aee2 (diff)
container: expose priority and SCHED_OTHER policy
The more explicit API removes the arbitrary limit preventing use of SCHED_OTHER (referred to as SCHED_NORMAL in the kernel). This change also exposes priority value to set. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/syscall.go')
-rw-r--r--container/syscall.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/container/syscall.go b/container/syscall.go
index cba9b7cc..35f6d006 100644
--- a/container/syscall.go
+++ b/container/syscall.go
@@ -63,12 +63,12 @@ type schedParam struct {
//
// [very subtle to use correctly]: https://www.openwall.com/lists/musl/2016/03/01/4
func schedSetscheduler(tid int, policy std.SchedPolicy, param *schedParam) error {
- if r, _, errno := Syscall(
+ if _, _, errno := Syscall(
SYS_SCHED_SETSCHEDULER,
uintptr(tid),
uintptr(policy),
uintptr(unsafe.Pointer(param)),
- ); r < 0 {
+ ); errno != 0 {
return errno
}
return nil