Skip to content

Commit 8e32fba

Browse files
committed
Added clock_getcpuclockid to more targets
1 parent b179309 commit 8e32fba

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,6 +3297,10 @@ extern "C" {
32973297
pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int;
32983298
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
32993299
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
3300+
pub fn clock_getcpuclockid(
3301+
pid: ::pid_t,
3302+
clk_id: *mut ::clockid_t,
3303+
) -> ::c_int;
33003304
pub fn lio_listio(
33013305
mode: ::c_int,
33023306
aiocb_list: *const *mut aiocb,

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,10 @@ extern "C" {
10711071
clk_id: ::clockid_t,
10721072
tp: *const ::timespec,
10731073
) -> ::c_int;
1074+
pub fn clock_getcpuclockid(
1075+
pid: ::pid_t,
1076+
clk_id: *mut ::clockid_t,
1077+
) -> ::c_int;
10741078

10751079
pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;
10761080

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,10 @@ extern "C" {
12281228
clk_id: ::clockid_t,
12291229
tp: *const ::timespec,
12301230
) -> ::c_int;
1231+
pub fn clock_getcpuclockid(
1232+
pid: ::pid_t,
1233+
clk_id: *mut ::clockid_t,
1234+
) -> ::c_int;
12311235

12321236
pub fn extattr_delete_fd(
12331237
fd: ::c_int,

src/unix/linux_like/emscripten/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,10 @@ extern "C" {
17841784
pub fn srand(seed: ::c_uint);
17851785

17861786
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
1787+
pub fn clock_getcpuclockid(
1788+
pid: ::pid_t,
1789+
clk_id: *mut ::clockid_t,
1790+
) -> ::c_int;
17871791

17881792
pub fn setpwent();
17891793
pub fn endpwent();

0 commit comments

Comments
 (0)