interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / src / new / qurt / sys / sched.rs

27 lines · 796 bytes Raw Blame History
1//! Header: `sys/sched.h`
2//!
3//! QuRT scheduling parameters and functions.
4
5use crate::prelude::*;
6
7// Scheduling policies (from QuRT sys/sched.h)
8pub const SCHED_FIFO: c_int = 0;
9pub const SCHED_RR: c_int = 1;
10pub const SCHED_SPORADIC: c_int = 2;
11pub const SCHED_OTHER: c_int = 3;
12
13s! {
14 pub struct sched_param {
15 pub unimplemented: *mut c_void,
16 pub sched_priority: c_int,
17 }
18}
19
20extern "C" {
21 // Note: sched_yield is static inline in QuRT sys/sched.h, so there is no
22 // linkable symbol in the SDK libraries. Programs must provide their own
23 // implementation or use --defsym=sched_yield=abort at link time.
24 pub fn sched_yield() -> c_int;
25 pub fn sched_get_priority_max(policy: c_int) -> c_int;
26 pub fn sched_get_priority_min(policy: c_int) -> c_int;
27}