Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add SysV semaphore constants #4286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 0x1000;

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
Loading