Closed
Description
- Architecture tested:
x86_64-linux-unknown-gnu
, though to the best of my knowledge all linuxes should apply - https://www.man7.org/linux/man-pages/man7/sysvipc.7.html
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.