Skip to content

Commit a0e4f9d

Browse files
committed
Auto merge of #2745 - vityafx:add-sched-constants-for-openbsd, r=Amanieu
Add SCHED constants for OpenBSD. The constants are defined for improving the user experience when calling the libc functions related to scheduling policies. Also helps with unifiying the code as all these constants are already defined for other operating systems.
2 parents c253699 + cdba825 commit a0e4f9d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libc-test/semver/openbsd.txt

+3
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,9 @@ RTLD_SELF
708708
RUSAGE_CHILDREN
709709
RUSAGE_SELF
710710
RUSAGE_THREAD
711+
SCHED_FIFO
712+
SCHED_OTHER
713+
SCHED_RR
711714
SCM_RIGHTS
712715
SCM_TIMESTAMP
713716
SEM_FAILED

src/unix/bsd/netbsdlike/openbsd/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,10 @@ pub const _SC_NPROCESSORS_ONLN: ::c_int = 503;
11651165

11661166
pub const FD_SETSIZE: usize = 1024;
11671167

1168+
pub const SCHED_FIFO: ::c_int = 1;
1169+
pub const SCHED_OTHER: ::c_int = 2;
1170+
pub const SCHED_RR: ::c_int = 3;
1171+
11681172
pub const ST_NOSUID: ::c_ulong = 2;
11691173

11701174
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;

0 commit comments

Comments
 (0)