diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-12 01:14:03 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-12 01:14:03 +0900 |
| commit | 196b200d0f19c41730db439c62db9b39e424f21f (patch) | |
| tree | 0723b900cea0816b6501f3933f768fb75453dd49 /container/std | |
| parent | 04e6bc3c5c99d6a99f17cfa5f69f34fe8941aee2 (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/std')
| -rw-r--r-- | container/std/syscall.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/container/std/syscall.go b/container/std/syscall.go index 8ebf33d4..61c54877 100644 --- a/container/std/syscall.go +++ b/container/std/syscall.go @@ -134,7 +134,7 @@ func (policy SchedPolicy) GetPriorityMax() (Int, error) { 0, 0, ) schedPriority[policy][0] = Int(priority) - if schedPriority[policy][0] < 0 { + if errno != 0 { schedPriorityErr[policy][0] = errno } }) @@ -151,10 +151,9 @@ func (policy SchedPolicy) GetPriorityMin() (Int, error) { 0, 0, ) schedPriority[policy][1] = Int(priority) - if schedPriority[policy][1] < 0 { + if errno != 0 { schedPriorityErr[policy][1] = errno } }) return schedPriority[policy][1], schedPriorityErr[policy][1] - } |
