Skip to content

Commit

Permalink
Auto merge of #2350 - rtzoeller:solarish_scheduler, r=JohnTitor
Browse files Browse the repository at this point in the history
Add sched_get/setparam and sched_get/setscheduler to Solarish

Also define scheduling constants for illumos.
  • Loading branch information
bors committed Aug 19, 2021
2 parents e4d2225 + 0904320 commit 200345c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/unix/solarish/mod.rs
Expand Up @@ -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")]
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 200345c

Please sign in to comment.