Merge pull request #356 from fiveop/sched_for_android

Move a few scheduling related functions from linux to notbsd.
This commit is contained in:
Alex Crichton 2016-08-15 12:03:23 -07:00 committed by GitHub
commit 08f5e9dd90
2 changed files with 8 additions and 8 deletions

View File

@ -590,21 +590,13 @@ extern {
pub fn mq_setattr(mqd: ::mqd_t,
newattr: *const ::mq_attr,
oldattr: *mut ::mq_attr) -> ::c_int;
pub fn sched_getaffinity(pid: ::pid_t,
cpusetsize: ::size_t,
cpuset: *mut cpu_set_t) -> ::c_int;
pub fn sched_setaffinity(pid: ::pid_t,
cpusetsize: ::size_t,
cpuset: *const cpu_set_t) -> ::c_int;
pub fn epoll_pwait(epfd: ::c_int,
events: *mut ::epoll_event,
maxevents: ::c_int,
timeout: ::c_int,
sigmask: *const ::sigset_t) -> ::c_int;
pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
pub fn unshare(flags: ::c_int) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
pub fn mkostemps(template: *mut ::c_char,
suffixlen: ::c_int,

View File

@ -866,6 +866,14 @@ extern {
clock_id: *mut clockid_t) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
pub fn sched_getaffinity(pid: ::pid_t,
cpusetsize: ::size_t,
cpuset: *mut cpu_set_t) -> ::c_int;
pub fn sched_setaffinity(pid: ::pid_t,
cpusetsize: ::size_t,
cpuset: *const cpu_set_t) -> ::c_int;
pub fn unshare(flags: ::c_int) -> ::c_int;
pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
}
cfg_if! {