Skip to content

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

Open

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.

Activity

  1. added this to the urgent milestone on Oct 29, 2025
  2. added
    enhancement
    standard library
    os-netbsd
    on Oct 29, 2025
  3. alexrp commented on Nov 1, 2025

    @alexrp
    Member

    This also affects illumos: #7152 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementos-illumosos-netbsdstandard library

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions