Skip to content

Commit

Permalink
netbsd siginfo_t si_status accessor
Browse files Browse the repository at this point in the history
closes #2265
  • Loading branch information
devnexen committed Jul 6, 2021
1 parent f3b7e0e commit cddf85a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ impl siginfo_t {
}
(*(self as *const siginfo_t as *const siginfo_timer)).value
}

pub unsafe fn si_status(&self) -> ::c_int {
#[repr(C)]
struct siginfo_timer {
_si_signo: ::c_int,
_si_errno: ::c_int,
_si_code: ::c_int,
__pad1: ::c_int,
_pid: ::pid_t,
_uid: ::uid_t,
_value: ::sigval,
_cpid: ::pid_t,
_cuid: ::uid_t,
status: ::c_int,
}
(*(self as *const siginfo_t as *const siginfo_timer)).status
}
}

s! {
Expand Down

0 comments on commit cddf85a

Please sign in to comment.