Source
pub const pthread_cond_t = switch (native_os) {
.linux => extern struct {
data: [48]u8 align(@alignOf(usize)) = [_]u8{0} ** 48,
},
.macos, .ios, .tvos, .watchos, .visionos => extern struct {
sig: c_long = 0x3CB0B1BB,
data: [data_len]u8 = [_]u8{0} ** data_len,
const data_len = if (@sizeOf(usize) == 8) 40 else 24;
},
.freebsd, .dragonfly, .openbsd => extern struct {
inner: ?*anyopaque = null,
},
.hermit => extern struct {
ptr: usize = maxInt(usize),
},
.netbsd => extern struct {
magic: u32 = 0x55550005,
lock: pthread_spin_t = 0,
waiters_first: ?*u8 = null,
waiters_last: ?*u8 = null,
mutex: ?*pthread_mutex_t = null,
private: ?*anyopaque = null,
},
.haiku => extern struct {
flags: u32 = 0,
unused: i32 = -42,
mutex: ?*anyopaque = null,
waiter_count: i32 = 0,
lock: i32 = 0,
},
.solaris, .illumos => extern struct {
flag: [4]u8 = [_]u8{0} ** 4,
type: u16 = 0,
magic: u16 = 0x4356,
data: u64 = 0,
},
.fuchsia, .emscripten => extern struct {
data: [48]u8 align(@alignOf(usize)) = [_]u8{0} ** 48,
},
// https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L80-L84
.serenity => extern struct {
mutex: ?*pthread_mutex_t = null,
value: u32 = 0,
clockid: clockid_t = .REALTIME_COARSE,
},
else => void,
}