diff options
author | bors <bors@rust-lang.org> | 2021-09-03 23:48:25 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-09-03 23:48:25 +0000 |
commit | 54fca8130b556fd87aea326a269dc4678463ed77 (patch) | |
tree | 220cf604a6727d1bdb6f422f84e5f7f356c5c0ec | |
parent | 24c3b9086d1959a0465d45a0466689c1afd4e80d (diff) | |
parent | 1b10d9e9581ce2113ef3bf20dd2f2d439539c495 (diff) | |
download | rust-libc-54fca8130b556fd87aea326a269dc4678463ed77.tar.gz |
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
```
-rw-r--r-- | libc-test/semver/apple.txt | 3 | ||||
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index d2cf8966f1..e67830880f 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1108,6 +1108,9 @@ SAE_ASSOCID_ANY SAE_CONNID_ALL SAE_CONNID_ANY SCALE_PPM +SCHED_OTHER +SCHED_FIFO +SCHED_RR SCM_CREDS SCM_RIGHTS SCM_TIMESTAMP diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index a368be1d00..33a0c4a69e 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -3471,6 +3471,10 @@ pub const FD_SETSIZE: usize = 1024; pub const ST_NOSUID: ::c_ulong = 2; +pub const SCHED_OTHER: ::c_int = 1; +pub const SCHED_FIFO: ::c_int = 4; +pub const SCHED_RR: ::c_int = 2; + pub const EVFILT_READ: i16 = -1; pub const EVFILT_WRITE: i16 = -2; pub const EVFILT_AIO: i16 = -3; |