twizzler-operating-system / twizzler

The Twizzler Operating System
BSD 3-Clause "New" or "Revised" License
66 stars 14 forks source link

Port parking_lot. #194

Closed dbittman closed 1 month ago

dbittman commented 1 month ago

This PR adds a ported version of parking_lot to [patch.crates-io]. The parking_lot crate provides a set of synchronizations primitives with riches semantics than the ones from std, and is widely used in the crate ecosystem. The port effort is small, as the only OS-dependent code is in parking_lot_core/thread_parker/.rs.

The change in this repo is small, as much of the actual work is in our parking_lot fork (link to diff). That code should be reviewed, but note that it is basically a direct copy of the linux version (see linux.rs in the same directory as twizzler.rs).