aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-12 01:20:08 +0900
committerOphestra <cat@gensokyo.uk>2026-03-12 02:15:14 +0900
commit620062cca92b6241c15f96f86a9c6f0f7882ecca (patch)
tree400b5e46d0166d954373483fd948055d6f807cac /internal
parent196b200d0f19c41730db439c62db9b39e424f21f (diff)
hst: expose scheduling priority
This is useful when limits are configured to allow it. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/outcome/outcome.go3
-rw-r--r--internal/outcome/shim.go3
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go
index cb86b390..c72f688f 100644
--- a/internal/outcome/outcome.go
+++ b/internal/outcome/outcome.go
@@ -100,7 +100,8 @@ func newOutcomeState(k syscallDispatcher, msg message.Msg, id *hst.ID, config *h
PrivPID: k.getpid(),
Verbose: msg.IsVerbose(),
- SchedPolicy: config.SchedPolicy,
+ SchedPolicy: config.SchedPolicy,
+ SchedPriority: config.SchedPriority,
},
ID: id,
diff --git a/internal/outcome/shim.go b/internal/outcome/shim.go
index 6d3e8d8b..a35ea1fe 100644
--- a/internal/outcome/shim.go
+++ b/internal/outcome/shim.go
@@ -75,6 +75,8 @@ type shimParams struct {
// Copied from [hst.Config].
SchedPolicy std.SchedPolicy
+ // Copied from [hst.Config].
+ SchedPriority std.Int
// Outcome setup ops, contains setup state. Populated by outcome.finalise.
Ops []outcomeOp
@@ -276,6 +278,7 @@ func shimEntrypoint(k syscallDispatcher) {
z := container.New(ctx, msg)
z.SetScheduler = state.Shim.SchedPolicy > 0
z.SchedPolicy = state.Shim.SchedPolicy
+ z.SchedPriority = state.Shim.SchedPriority
z.Params = *stateParams.params
z.Stdin, z.Stdout, z.Stderr = os.Stdin, os.Stdout, os.Stderr