Skip to content

Fix UB in the locking code of context switching

bjorn3 requested to merge bjorn3/kernel:less_ub into master

The spin crate considers it UB to call force_write_unlock while there is a threads trying to obtain a read lock on the same rwlock.

This also switches to the spinning_lot crate for the context rwlock as it has support for a write guard keeping a reference to the rwlock using an Arc instead of a reference.

Merge request reports