Skip to content

Commit

Permalink
修正了 write_irqsave方法
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiichen committed Aug 24, 2023
1 parent 309cfc7 commit 0ae8dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/src/libs/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ impl<T> RwLock<T> {
#[inline]
/// @brief 获取WRITER守卫并关中断
pub fn write_irqsave(&self) -> RwLockWriteGuard<T> {
let irq_guard = unsafe { CurrentIrqArch::save_and_disable_irq() };
loop {
let irq_guard = unsafe { CurrentIrqArch::save_and_disable_irq() };
match self.try_write() {
Some(mut guard) => {
guard.irq_guard = Some(irq_guard);
Expand Down

0 comments on commit 0ae8dfc

Please sign in to comment.