Skip to content

Add missing constants for System V semaphores #4264

Closed
@bertptrs

Description

@bertptrs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions