Skip to content

Commit a4178c5

Browse files
committed
siginfo: Provide functions for si_utime and si_stime
The SIGCHLD variant of the siginfo structure also provides fields for user and system time; expose those as well.
1 parent e3bce75 commit a4178c5

File tree

1 file changed

+10
-0
lines changed
  • src/unix/linux_like/linux/gnu

1 file changed

+10
-0
lines changed

src/unix/linux_like/linux/gnu/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ cfg_if! {
322322
si_pid: ::pid_t,
323323
si_uid: ::uid_t,
324324
si_status: ::c_int,
325+
si_utime: ::c_long,
326+
si_stime: ::c_long,
325327
}
326328

327329
// Internal, for casts to access union fields
@@ -356,6 +358,14 @@ cfg_if! {
356358
pub unsafe fn si_status(&self) -> ::c_int {
357359
self.sifields().sigchld.si_status
358360
}
361+
362+
pub unsafe fn si_utime(&self) -> ::c_long {
363+
self.sifields().sigchld.si_utime
364+
}
365+
366+
pub unsafe fn si_stime(&self) -> ::c_long {
367+
self.sifields().sigchld.si_stime
368+
}
359369
}
360370
}
361371
}

0 commit comments

Comments
 (0)