From 196b200d0f19c41730db439c62db9b39e424f21f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 12 Mar 2026 01:14:03 +0900 Subject: 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 --- container/syscall.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'container/syscall.go') 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 -- cgit v1.3.1