diff options
author | Greg V <greg@unrelenting.technology> | 2018-01-22 19:44:59 +0300 |
---|---|---|
committer | Greg V <greg@unrelenting.technology> | 2018-01-23 13:13:48 +0300 |
commit | c13302d87e7071081637421577b589c6c9183af7 (patch) | |
tree | 81b47ea1b97aaace487ca6bd5eb7d461711c7ad0 /src/unix/bsd/freebsdlike/freebsd | |
parent | 2aeb382bb8df0add15f9e1c693882672cfde86c8 (diff) | |
download | rust-libc-c13302d87e7071081637421577b589c6c9183af7.tar.gz |
Add rtprio (realtime priority) API for FreeBSD and DragonFly
Diffstat (limited to 'src/unix/bsd/freebsdlike/freebsd')
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 5afb42aa3e..1e5f4f03ee 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -846,6 +846,11 @@ pub const PD_DAEMON: ::c_int = 0x00000001; pub const PD_CLOEXEC: ::c_int = 0x00000002; pub const PD_ALLOWED_AT_FORK: ::c_int = PD_DAEMON | PD_CLOEXEC; +// Values for struct rtprio (type_ field) +pub const RTP_PRIO_REALTIME: ::c_ushort = 2; +pub const RTP_PRIO_NORMAL: ::c_ushort = 3; +pub const RTP_PRIO_IDLE: ::c_ushort = 4; + extern { pub fn __error() -> *mut ::c_int; @@ -905,6 +910,9 @@ extern { pub fn pdfork(fdp: *mut ::c_int, flags: ::c_int) -> ::pid_t; pub fn pdgetpid(fd: ::c_int, pidp: *mut ::pid_t) -> ::c_int; pub fn pdkill(fd: ::c_int, signum: ::c_int) -> ::c_int; + + pub fn rtprio_thread(function: ::c_int, lwpid: ::lwpid_t, + rtp: *mut super::rtprio) -> ::c_int; } cfg_if! { |