Skip to content

Commit

Permalink
add BUS_ si_code constants
Browse files Browse the repository at this point in the history
  • Loading branch information
i509VCB committed Jul 31, 2022
1 parent 4bfd852 commit b3ea8ff
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -198,6 +198,11 @@ BS0
BS1
BSDLY
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
BUS_MCEERR_AR
BUS_MCEERR_AO
CANFD_BRS
CANFD_ESI
CANFD_MAX_DLC
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/mod.rs
Expand Up @@ -449,6 +449,12 @@ pub const TCP_MAXSEG: ::c_int = 2;

pub const PIPE_BUF: usize = 512;

// si_code values for SIGBUS signal
pub const BUS_ADRALN: ::c_int = 1;
pub const BUS_ADRERR: ::c_int = 2;
pub const BUS_OBJERR: ::c_int = 3;

// si_code values for SIGCHLD signal
pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
Expand Down
6 changes: 6 additions & 0 deletions src/unix/haiku/mod.rs
Expand Up @@ -1243,6 +1243,12 @@ pub const WEXITED: ::c_int = 0x08;
pub const WSTOPPED: ::c_int = 0x10;
pub const WNOWAIT: ::c_int = 0x20;

// si_code values for SIGBUS signal
pub const BUS_ADRALN: ::c_int = 40;
pub const BUS_ADRERR: ::c_int = 41;
pub const BUS_OBJERR: ::c_int = 42;

// si_code values for SIGCHLD signal
pub const CLD_EXITED: ::c_int = 60;
pub const CLD_KILLED: ::c_int = 61;
pub const CLD_DUMPED: ::c_int = 62;
Expand Down
9 changes: 9 additions & 0 deletions src/unix/linux_like/mod.rs
Expand Up @@ -1211,6 +1211,15 @@ pub const PIPE_BUF: usize = 4096;

pub const SI_LOAD_SHIFT: ::c_uint = 16;

// si_code values for SIGBUS signal
pub const BUS_ADRALN: ::c_int = 1;
pub const BUS_ADRERR: ::c_int = 2;
pub const BUS_OBJERR: ::c_int = 3;
// Linux-specific si_code values for SIGBUS signal
pub const BUS_MCEERR_AR: ::c_int = 4;
pub const BUS_MCEERR_AO: ::c_int = 5;

// si_code values for SIGCHLD signal
pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
Expand Down

0 comments on commit b3ea8ff

Please sign in to comment.