|
1 | 1 | pub type fsblkcnt_t = ::c_ulong;
|
2 | 2 | pub type fsfilcnt_t = ::c_ulong;
|
3 | 3 | pub type rlim_t = c_ulong;
|
| 4 | +pub type __priority_which_t = ::c_uint; |
4 | 5 |
|
5 | 6 | s! {
|
6 | 7 | pub struct glob64_t {
|
@@ -524,6 +525,44 @@ pub const B3000000: ::speed_t = 0o010015;
|
524 | 525 | pub const B3500000: ::speed_t = 0o010016;
|
525 | 526 | pub const B4000000: ::speed_t = 0o010017;
|
526 | 527 |
|
| 528 | +#[link(name = "util")] |
| 529 | +extern { |
| 530 | + pub fn sysctl(name: *mut ::c_int, |
| 531 | + namelen: ::c_int, |
| 532 | + oldp: *mut ::c_void, |
| 533 | + oldlenp: *mut ::size_t, |
| 534 | + newp: *mut ::c_void, |
| 535 | + newlen: ::size_t) |
| 536 | + -> ::c_int; |
| 537 | + pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; |
| 538 | + pub fn backtrace(buf: *mut *mut ::c_void, |
| 539 | + sz: ::c_int) -> ::c_int; |
| 540 | + pub fn glob64(pattern: *const ::c_char, |
| 541 | + flags: ::c_int, |
| 542 | + errfunc: ::dox::Option<extern fn(epath: *const ::c_char, |
| 543 | + errno: ::c_int) |
| 544 | + -> ::c_int>, |
| 545 | + pglob: *mut glob64_t) -> ::c_int; |
| 546 | + pub fn globfree64(pglob: *mut glob64_t); |
| 547 | + pub fn ptrace(request: ::c_uint, ...) -> ::c_long; |
| 548 | + pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t, |
| 549 | + cpusetsize: ::size_t, |
| 550 | + cpuset: *mut ::cpu_set_t) -> ::c_int; |
| 551 | + pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t, |
| 552 | + cpusetsize: ::size_t, |
| 553 | + cpuset: *const ::cpu_set_t) -> ::c_int; |
| 554 | + pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int; |
| 555 | + pub fn setpriority(which: ::__priority_which_t, who: ::id_t, |
| 556 | + prio: ::c_int) -> ::c_int; |
| 557 | + pub fn pthread_getaffinity_np(thread: ::pthread_t, |
| 558 | + cpusetsize: ::size_t, |
| 559 | + cpuset: *mut ::cpu_set_t) -> ::c_int; |
| 560 | + pub fn pthread_setaffinity_np(thread: ::pthread_t, |
| 561 | + cpusetsize: ::size_t, |
| 562 | + cpuset: *const ::cpu_set_t) -> ::c_int; |
| 563 | + pub fn sched_getcpu() -> ::c_int; |
| 564 | +} |
| 565 | + |
527 | 566 | cfg_if! {
|
528 | 567 | if #[cfg(target_arch = "mips")] {
|
529 | 568 | mod mips32;
|
|
0 commit comments