Skip to content

Commit

Permalink
fill out sys/sem.h
Browse files Browse the repository at this point in the history
semget, semop, semctl; semtimedop not implemented and struct semun not defined
  • Loading branch information
Andrew Salmon committed May 26, 2017
1 parent e976c37 commit 548e4cf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ s! {
pub msg_hdr: ::msghdr,
pub msg_len: ::c_uint,
}

pub struct sembuf {
pub semval: ::c_ushort,
pub semzcnt: ::c_ushort,
pub semncnt: ::c_ushort,
pub sempid: ::pid_t,
}

pub struct semid_ds {
pub sem_perm: ::ipc_perm,
pub sem_otime: ::time_t,
pub sem_ctime: ::time_t,
pub sem_nsems: ::c_ulong,
}
}

pub const ABDAY_1: ::nl_item = 0x20000;
Expand Down Expand Up @@ -796,6 +810,9 @@ extern {
cmd: ::c_int,
buf: *mut ::shmid_ds) -> ::c_int;
pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
Expand Down

0 comments on commit 548e4cf

Please sign in to comment.