Skip to content
Snippets Groups Projects
user avatar
Boqun Feng authored
`SpinLock`'s backend can be used for `SpinLockIrq`, if the interrupts
are disabled. And it actually provides performance gains since
interrupts are not needed to be disabled anymore. So add
`Backend::BackendInContext` to describe the case where one backend can
be used for another. Use the it to implement the `lock_with()` so that
`SpinLockIrq` can avoid disabling interrupts by using `SpinLock`'s
backend.

Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
d9d209df
History
Name Last commit Last update
..