Skip to content

Commit

Permalink
Add SysV semaphore constants
Browse files Browse the repository at this point in the history
  • Loading branch information
bertptrs committed Feb 25, 2025
1 parent a92ecf7 commit 3dacbcd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,11 @@ GENL_ID_CTRL
GENL_MAX_ID
GENL_MIN_ID
GENL_NAMSIZ
GETALL
GETNCNT
GETPID
GETVAL
GETZCNT
GLOB_ABORTED
GLOB_APPEND
GLOB_DOOFFS
Expand Down Expand Up @@ -2744,6 +2749,12 @@ SEEK_DATA
SEEK_HOLE
SELFMAG
SEM_FAILED
SEM_INFO
SEM_STAT
SEM_STAT_ANY
SEM_UNDO
SETALL
SETVAL
SFD_CLOEXEC
SFD_NONBLOCK
SHM_EXEC
Expand Down
13 changes: 13 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2979,6 +2979,19 @@ pub const MSG_NOERROR: c_int = 0o10000;
pub const MSG_EXCEPT: c_int = 0o20000;
pub const MSG_ZEROCOPY: c_int = 0x4000000;

pub const SEM_UNDO: c_int = 4096;

pub const GETPID: c_int = 11;
pub const GETVAL: c_int = 12;
pub const GETALL: c_int = 13;
pub const GETNCNT: c_int = 14;
pub const GETZCNT: c_int = 15;
pub const SETVAL: c_int = 16;
pub const SETALL: c_int = 17;
pub const SEM_STAT: c_int = 18;
pub const SEM_INFO: c_int = 19;
pub const SEM_STAT_ANY: c_int = 20;

pub const SHM_R: c_int = 0o400;
pub const SHM_W: c_int = 0o200;

Expand Down

0 comments on commit 3dacbcd

Please sign in to comment.