Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

pthread_spinlock_t

c.pthread_spinlock_t
pub const pthread_spinlock_t = switch (native_os)

File

lib/std/c.zig:7902

Code

pub const pthread_spinlock_t = switch (native_os) {
    .openbsd => openbsd.pthread_spinlock_t,
    .freebsd => extern struct {
        inner: ?*anyopaque = null,
    },
    .netbsd => extern struct {
        pts_magic: c_uint,
        spin: pthread_spin_t,
        pts_flags: c_int,
    },
    .windows => isize,
    else => c_int,
}