@@ -225,6 +225,20 @@ s! {
225
225
pub msg_hdr: :: msghdr,
226
226
pub msg_len: :: c_uint,
227
227
}
228
+
229
+ pub struct sembuf {
230
+ pub semval: :: c_ushort,
231
+ pub semzcnt: :: c_ushort,
232
+ pub semncnt: :: c_ushort,
233
+ pub sempid: :: pid_t,
234
+ }
235
+
236
+ pub struct semid_ds {
237
+ pub sem_perm: :: ipc_perm,
238
+ pub sem_otime: :: time_t,
239
+ pub sem_ctime: :: time_t,
240
+ pub sem_nsems: :: c_ulong,
241
+ }
228
242
}
229
243
230
244
pub const ABDAY_1 : :: nl_item = 0x20000 ;
@@ -796,6 +810,9 @@ extern {
796
810
cmd : :: c_int ,
797
811
buf : * mut :: shmid_ds ) -> :: c_int ;
798
812
pub fn ftok ( pathname : * const :: c_char , proj_id : :: c_int ) -> :: key_t ;
813
+ pub fn semget ( key : :: key_t , nsems : :: c_int , semflag : :: c_int ) -> :: c_int ;
814
+ pub fn semop ( semid : :: c_int , sops : * mut :: sembuf , nsops : :: size_t ) -> :: c_int ;
815
+ pub fn semctl ( semid : :: c_int , semnum : :: c_int , cmd : :: c_int , ...) -> :: c_int ;
799
816
pub fn msgctl ( msqid : :: c_int , cmd : :: c_int , buf : * mut msqid_ds ) -> :: c_int ;
800
817
pub fn msgget ( key : :: key_t , msgflg : :: c_int ) -> :: c_int ;
801
818
pub fn msgrcv ( msqid : :: c_int , msgp : * mut :: c_void , msgsz : :: size_t ,
0 commit comments