Skip to content

Commit 24edba1

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 24edba1

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ s! {
3434
__pad2: c_ulong,
3535
}
3636

37+
pub struct semid_ds {
38+
pub sem_perm: crate::ipc_perm,
39+
pub sem_otime: crate::time_t,
40+
pub sem_ctime: crate::time_t,
41+
#[cfg(target_endian = "little")]
42+
pub sem_nsems: crate::c_ushort,
43+
#[cfg(target_endian = "little")]
44+
__sem_nsems_pad: crate::c_char,
45+
#[cfg(target_endian = "big")]
46+
__sem_nsems_pad: crate::c_char,
47+
#[cfg(target_endian = "big")]
48+
pub sem_nsems: crate::c_ushort,
49+
__unused3: crate::c_long,
50+
__unused4: crate::c_long,
51+
}
52+
3753
pub struct msqid_ds {
3854
pub msg_perm: crate::ipc_perm,
3955
pub msg_stime: crate::time_t,

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

Lines changed: 13 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,

0 commit comments

Comments
 (0)