Skip to content
This repository was archived by the owner on Oct 29, 2026. It is now read-only.
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Support std::sync::Condvar #40

Closed

Description

@sunfishcode

Unless there are any complications, this should just be a matter of implementing pthread_cond_* in terms of origin::Condvar.

Activity

  1. jplatte commented on Oct 8, 2021

    @jplatte
    Contributor

    I'd love to work on this, though can't say for sure that I'll find the necessary time. Looking at the unimplemented pthread_* stubs in c-scape/src/lib.rs, I'm immediately surprised thta so many of these functions don't have any arguments, e.g. all of pthread_cond_init / pthread_cond_signal / pthread_cond_destroy. We'll see where this goes... 🙂

  2. sunfishcode commented on Oct 8, 2021

    @sunfishcode
    OwnerAuthor

    Sounds great! Feel free to ask questions. The missing arguments thing is just laziness :-}. extern "C" functions kind of work if you pass them more arguments they expect, and it's a little easier to define stubs that way. To implement actually implement them, we'll need to use the proper signatures.

    Take a look at PthreadMutexT and PthreadMutexattrT for examples of how to implement PthreadCondT (aka pthread_cond_t) and PthreadCondattrT (aka pthread_condattr_t).

  3. jplatte commented on Oct 25, 2021

    @jplatte
    Contributor

    I don't think I'll have much time to work on this over the next week, if sbd. else is interested in picking the work up where I left it (all I did so far is figuring out how to define the two libc types and updating the related function signatures), feel free to.

  4. sunfishcode commented on Jun 21, 2022

    @sunfishcode
    OwnerAuthor

    As an update here, mustang is no longer using parking_lot, so now this should use origin::CondVar instead.

  5. added 2 commits that reference this issue on Jun 24, 2022
    2de3869
    86333b0
  6. added a commit that references this issue on Jun 24, 2022
    ad07427
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions