Skip to content

Commit 94f085b

Browse files
committed
Added clock_getcpuclockid to more targets
1 parent b179309 commit 94f085b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

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

+4
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/linux/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -2761,11 +2761,6 @@ extern "C" {
27612761
sevp: *mut ::sigevent,
27622762
) -> ::c_int;
27632763

2764-
pub fn clock_getcpuclockid(
2765-
pid: ::pid_t,
2766-
clk_id: *mut ::clockid_t,
2767-
) -> ::c_int;
2768-
27692764
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
27702765

27712766
pub fn setpwent();

src/unix/linux_like/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,12 @@ extern "C" {
13141314
clk_id: ::clockid_t,
13151315
tp: *const ::timespec,
13161316
) -> ::c_int;
1317+
#[cfg(not(target_os = "emscripten"))]
1318+
pub fn clock_getcpuclockid(
1319+
pid: ::pid_t,
1320+
clk_id: *mut ::clockid_t,
1321+
) -> ::c_int;
1322+
13171323
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
13181324

13191325
pub fn pthread_getattr_np(

0 commit comments

Comments
 (0)