Skip to content

Commit 4002d8c

Browse files
committed
musl: add semid_ds and seminfo
Adds the semid_ds struct based upon arch/generic/bits/sem.h and adds the seminfo struct based upon include/sys/sem.h. Signed-off-by: Aster Boese <[email protected]>
1 parent 891cb8c commit 4002d8c

File tree

1 file changed

+29
-0
lines changed
  • src/unix/linux_like/linux/musl

1 file changed

+29
-0
lines changed

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,19 @@ s! {
279279
pub ch_addralign: crate::Elf32_Word,
280280
}
281281

282+
pub struct seminfo {
283+
pub semmap: c_int,
284+
pub semmni: c_int,
285+
pub semmns: c_int,
286+
pub semmnu: c_int,
287+
pub semmsl: c_int,
288+
pub semopm: c_int,
289+
pub semume: c_int,
290+
pub semusz: c_int,
291+
pub semvmx: c_int,
292+
pub semaem: c_int,
293+
}
294+
282295
pub struct timex {
283296
pub modes: c_uint,
284297
pub offset: c_long,
@@ -446,6 +459,22 @@ s_no_extra_traits! {
446459
pub __reserved: [c_char; 256],
447460
}
448461

462+
pub struct semid_ds {
463+
pub sem_perm: crate::ipc_perm,
464+
pub sem_otime: crate::time_t,
465+
pub sem_ctime: crate::time_t,
466+
#[cfg(target_endian = "little")]
467+
pub sem_nsems: crate::c_ushort,
468+
#[cfg(target_endian = "little")]
469+
__sem_nsems_pad: crate::c_char,
470+
#[cfg(target_endian = "big")]
471+
__sem_nsems_pad: crate::c_char,
472+
#[cfg(target_endian = "big")]
473+
pub sem_nsems: crate::c_ushort,
474+
__unused3: crate::c_long,
475+
__unused4: crate::c_long,
476+
}
477+
449478
pub struct utmpx {
450479
pub ut_type: c_short,
451480
__ut_pad1: c_short,

0 commit comments

Comments
 (0)