Skip to content

Commit cddf85a

Browse files
committed
netbsd siginfo_t si_status accessor
closes #2265
1 parent f3b7e0e commit cddf85a

File tree

1 file changed

+17
-0
lines changed
  • src/unix/bsd/netbsdlike/netbsd

1 file changed

+17
-0
lines changed

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ impl siginfo_t {
6464
}
6565
(*(self as *const siginfo_t as *const siginfo_timer)).value
6666
}
67+
68+
pub unsafe fn si_status(&self) -> ::c_int {
69+
#[repr(C)]
70+
struct siginfo_timer {
71+
_si_signo: ::c_int,
72+
_si_errno: ::c_int,
73+
_si_code: ::c_int,
74+
__pad1: ::c_int,
75+
_pid: ::pid_t,
76+
_uid: ::uid_t,
77+
_value: ::sigval,
78+
_cpid: ::pid_t,
79+
_cuid: ::uid_t,
80+
status: ::c_int,
81+
}
82+
(*(self as *const siginfo_t as *const siginfo_timer)).status
83+
}
6784
}
6885

6986
s! {

0 commit comments

Comments
 (0)