Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add missing constants for System V semaphores #4264

Open
bertptrs opened this issue Feb 14, 2025 · 2 comments · May be fixed by #4286
Open

Add missing constants for System V semaphores #4264

bertptrs opened this issue Feb 14, 2025 · 2 comments · May be fixed by #4286
Labels
C-API-request Category: API request

Comments

@bertptrs
Copy link

Note that the extern function definitions for the relevant APIs semget semop are already there, but the constants are not, making them harder to use. I'm currently using bindgen to work around this problem, the constants appear to be as follows:

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

These are all found in the <sys/sem.h> header.

@bertptrs bertptrs added the C-API-request Category: API request label Feb 14, 2025
@devnexen
Copy link
Contributor

Would you like to create a PR yourself eventually ?

@bertptrs
Copy link
Author

I could look into that, haven't contributed to this repo before so I'll try to familiarize myself with the conventions.

@bertptrs bertptrs linked a pull request Feb 25, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-API-request Category: API request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants