Skip to content

Commit 54fca81

Browse files
committed
Auto merge of #2384 - youknowone:apple-sched, r=JohnTitor
Add SCHED_* consts to apple platforms - MacOS: https://github.com/phracker/MacOSX-SDKs/blob/11.3/MacOSX10.11.sdk/usr/include/pthread/pthread_impl.h#L50-L52 I didn't find online references but checked also other SDKs in local machines. ```shell $ rg '#define SCHED_' MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/pthread/pthread_impl.h 54:#define SCHED_OTHER 1 55:#define SCHED_FIFO 4 56:#define SCHED_RR 2 ```
2 parents 24c3b90 + 1b10d9e commit 54fca81

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,9 @@ SAE_ASSOCID_ANY
11081108
SAE_CONNID_ALL
11091109
SAE_CONNID_ANY
11101110
SCALE_PPM
1111+
SCHED_OTHER
1112+
SCHED_FIFO
1113+
SCHED_RR
11111114
SCM_CREDS
11121115
SCM_RIGHTS
11131116
SCM_TIMESTAMP

src/unix/bsd/apple/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,6 +3471,10 @@ pub const FD_SETSIZE: usize = 1024;
34713471

34723472
pub const ST_NOSUID: ::c_ulong = 2;
34733473

3474+
pub const SCHED_OTHER: ::c_int = 1;
3475+
pub const SCHED_FIFO: ::c_int = 4;
3476+
pub const SCHED_RR: ::c_int = 2;
3477+
34743478
pub const EVFILT_READ: i16 = -1;
34753479
pub const EVFILT_WRITE: i16 = -2;
34763480
pub const EVFILT_AIO: i16 = -3;

0 commit comments

Comments
 (0)