Added getloadavg for Linux, the BSDs and Solaris.
Sadly Android's bionic lacks this functionality.
This commit is contained in:
parent
19fd504725
commit
72f1fb68d8
@ -342,7 +342,6 @@ f! {
|
||||
pub fn WCOREDUMP(status: ::c_int) -> bool {
|
||||
(status & 0o200) != 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extern {
|
||||
@ -360,6 +359,7 @@ extern {
|
||||
result: *mut *mut passwd) -> ::c_int;
|
||||
pub fn getprogname() -> *const ::c_char;
|
||||
pub fn setprogname(name: *const ::c_char);
|
||||
pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
@ -612,6 +612,7 @@ extern {
|
||||
resource: ::c_int,
|
||||
new_limit: *const ::rlimit64,
|
||||
old_limit: *mut ::rlimit64) -> ::c_int;
|
||||
pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
@ -903,5 +903,6 @@ extern {
|
||||
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
|
||||
pub fn getprogname() -> *const ::c_char;
|
||||
pub fn setprogname(name: *const ::c_char);
|
||||
pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user