summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2021-08-16 21:49:53 -0500
committerRyan Zoeller <rtzoeller@rtzoeller.com>2021-08-17 21:28:03 -0500
commit0904320c928ec98b3afea7874b29c7902490c836 (patch)
treee1444510c9d77e2d8360cb705abf02e3faaf5aa5
parent94bf82a6bc51d79c21a7e232a1b66f1a5026bacf (diff)
downloadrust-libc-0904320c928ec98b3afea7874b29c7902490c836.tar.gz
Add sched_get/setparam and sched_get/setscheduler to Solarish
Also define scheduling constants.
-rw-r--r--src/unix/solarish/mod.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs
index eb6c596ce1..ce21fe28d2 100644
--- a/src/unix/solarish/mod.rs
+++ b/src/unix/solarish/mod.rs
@@ -2105,6 +2105,14 @@ pub const PRIO_PROCESS: ::c_int = 0;
pub const PRIO_PGRP: ::c_int = 1;
pub const PRIO_USER: ::c_int = 2;
+pub const SCHED_OTHER: ::c_int = 0;
+pub const SCHED_FIFO: ::c_int = 1;
+pub const SCHED_RR: ::c_int = 2;
+pub const SCHED_SYS: ::c_int = 3;
+pub const SCHED_IA: ::c_int = 4;
+pub const SCHED_FSS: ::c_int = 5;
+pub const SCHED_FX: ::c_int = 6;
+
// As per sys/socket.h, header alignment must be 8 bytes on SPARC
// and 4 bytes everywhere else:
#[cfg(target_arch = "sparc64")]
@@ -2512,6 +2520,14 @@ extern "C" {
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
+ pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int;
+ pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int;
+ pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
+ pub fn sched_setscheduler(
+ pid: ::pid_t,
+ policy: ::c_int,
+ param: *const ::sched_param,
+ ) -> ::c_int;
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
#[cfg_attr(