Skip to content

Commit

Permalink
Auto merge of #2276 - devnexen:netbsd_siginfo_si_status, r=JohnTitor
Browse files Browse the repository at this point in the history
netbsd siginfo_t si_status accessor

closes #2265
  • Loading branch information
bors committed Jul 7, 2021
2 parents bddd5e7 + cddf85a commit c4ae71f
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 c4ae71f

Please sign in to comment.