Skip to content

std.Io.Threaded: implement Mutex and Condition #25760

@andrewrk

Description

@andrewrk

Extracted from #25592.

Unfortunately NetBSD does not have futexes, so Mutex and Condition must be based on pthread_mutex and pthread_condition. This will mean reserving 48 bytes into Io.Mutex for storing state.

    if (native_os == .netbsd) @panic("TODO");

Alternately (preferably), they could be based on _lwp_park and _lwp_unpark, which is how the pthreads API is implemented internally on NetBSD, but in this case roughly the same amount of storage for state will be needed in Io.Mutex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.os-illumoshttps://illumos.org/os-netbsdstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions