ext: isolate from container/std
All checks were successful
Test / Create distribution (push) Successful in 1m2s
Test / Sandbox (push) Successful in 2m39s
Test / ShareFS (push) Successful in 3m42s
Test / Hakurei (push) Successful in 3m46s
Test / Sandbox (race detector) (push) Successful in 5m7s
Test / Hakurei (race detector) (push) Successful in 6m12s
Test / Flake checks (push) Successful in 1m30s

These are too general to belong in the container package. This targets the v0.4 release to reduce the wrapper maintenance burden.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-17 13:35:48 +09:00
parent 08c35ca24f
commit cd5959fe5a
35 changed files with 3613 additions and 3608 deletions

View File

@@ -4,7 +4,7 @@ import (
. "syscall"
"unsafe"
"hakurei.app/container/std"
"hakurei.app/ext"
)
// Prctl manipulates various aspects of the behavior of the calling thread or process.
@@ -46,7 +46,7 @@ func Isatty(fd int) bool {
// schedParam is equivalent to struct sched_param from include/linux/sched.h.
type schedParam struct {
// sched_priority
priority std.Int
priority ext.Int
}
// schedSetscheduler sets both the scheduling policy and parameters for the
@@ -62,7 +62,7 @@ type schedParam struct {
// this if you do not have something similar in place!
//
// [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 {
func schedSetscheduler(tid int, policy ext.SchedPolicy, param *schedParam) error {
if _, _, errno := Syscall(
SYS_SCHED_SETSCHEDULER,
uintptr(tid),