Skip to content

Commit 49f3bfc

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 49f3bfc

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,58 @@ 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(any(
42+
target_arch = "aarch64",
43+
target_arch = "loongarch64",
44+
target_arch = "mips64",
45+
target_arch = "mips64r6",
46+
target_arch = "powerpc64",
47+
target_arch = "riscv64",
48+
target_arch = "sparc64",
49+
target_arch = "s390x",
50+
))]
51+
__sem_nsems_pad: crate::c_char,
52+
#[cfg(any(
53+
target_arch = "aarch64",
54+
target_arch = "loongarch64",
55+
target_arch = "mips64",
56+
target_arch = "mips64r6",
57+
target_arch = "powerpc64",
58+
target_arch = "riscv64",
59+
target_arch = "sparc64",
60+
target_arch = "s390x",
61+
))]
62+
pub sem_nsems: crate::c_ushort,
63+
#[cfg(not(any(
64+
target_arch = "aarch64",
65+
target_arch = "loongarch64",
66+
target_arch = "mips64",
67+
target_arch = "mips64r6",
68+
target_arch = "powerpc64",
69+
target_arch = "riscv64",
70+
target_arch = "sparc64",
71+
target_arch = "s390x",
72+
)))]
73+
__sem_nsems_pad: crate::c_char,
74+
#[cfg(not(any(
75+
target_arch = "aarch64",
76+
target_arch = "loongarch64",
77+
target_arch = "mips64",
78+
target_arch = "mips64r6",
79+
target_arch = "powerpc64",
80+
target_arch = "riscv64",
81+
target_arch = "sparc64",
82+
target_arch = "s390x",
83+
)))]
84+
pub sem_nsems: crate::c_ushort,
85+
__unused3: crate::c_ulong,
86+
__unused4: crate::c_ulong,
87+
}
88+
3789
pub struct msqid_ds {
3890
pub msg_perm: crate::ipc_perm,
3991
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)