From fd515badffc159b62c5140b8340164ccd29e41f5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 11 Mar 2026 20:03:08 +0900 Subject: container: move scheduler policy constants to std This avoids depending on cgo. Signed-off-by: Ophestra --- container/container.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'container/container.go') diff --git a/container/container.go b/container/container.go index e7fd8cee..49b3cfe6 100644 --- a/container/container.go +++ b/container/container.go @@ -40,7 +40,7 @@ type ( AllowOrphan bool // Scheduling policy to set via sched_setscheduler(2). The zero value // skips this call. Supported policies are [SCHED_BATCH], [SCHED_IDLE]. - SchedPolicy SchedPolicy + SchedPolicy std.SchedPolicy // Cgroup fd, nil to disable. Cgroup *int // ExtraFiles passed through to initial process in the container, with @@ -373,7 +373,7 @@ func (p *Container) Start() error { // sched_setscheduler: thread-directed but acts on all processes // created from the calling thread - if p.SchedPolicy > 0 && p.SchedPolicy <= _SCHED_LAST { + if p.SchedPolicy > 0 && p.SchedPolicy <= std.SCHED_LAST { var param schedParam if priority, err := p.SchedPolicy.GetPriorityMin(); err != nil { return &StartError{ -- cgit v1.3.1