Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jul 4, 2020

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.

Austin Kiekintveld added 2 commits July 4, 2020 11:04
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.
Copy link
Member

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@phil-opp phil-opp merged commit 0e5c87e into rust-osdev:master Jul 6, 2020
phil-opp added a commit that referenced this pull request Jul 6, 2020
@phil-opp
Copy link
Member

phil-opp commented Jul 6, 2020

Published as v0.2.0

@ghost ghost deleted the lock_api_0_4_0 branch July 7, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant