rust-osdev / spinning_top

A simple spinlock crate based on the abstractions provided by the `lock_api` crate.
Apache License 2.0
37 stars 4 forks source link

Upgrade `lock_api` to 0.4.0 #3

Closed ghost closed 4 years ago

ghost commented 4 years ago

This upgrade introduces a new is_locked function to the Mutex and RawMutex types. The default implementation for RawMutex works, but is less efficient, so a new implementation is added.

Also, unlock was marked unsafe in RawMutex because it cannot safely be called unless the lock is already held. This implementation already made this assumption.

phil-opp commented 4 years ago

Published as v0.2.0