cargo fix --edition & rustfmt
Or to be precise: RUST_TARGET_PATH=$(pwd)/targets cargo fix --edition \ --target targets/x86_64-unknown-kernel.json \ --target targets/i686-unknown-kernel.json \ --target targets/aarch64-unknown-kernel.json \ --target targets/riscv64-unknown-kernel.json \ -Zbuild-std=core,alloc --allow-dirty --bin kernel cargo fmt
This commit is contained in:
+13
-8
@@ -31,15 +31,20 @@ impl<T> WaitQueue<T> {
|
||||
loop {
|
||||
let mut inner = self.inner.lock();
|
||||
|
||||
if let Some(t) = inner.pop_front() {
|
||||
return Ok(t);
|
||||
} else if block {
|
||||
if !self.condition.wait(inner, reason) {
|
||||
return Err(Error::new(EINTR));
|
||||
match inner.pop_front() {
|
||||
Some(t) => {
|
||||
return Ok(t);
|
||||
}
|
||||
_ => {
|
||||
if block {
|
||||
if !self.condition.wait(inner, reason) {
|
||||
return Err(Error::new(EINTR));
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
return Err(Error::new(EAGAIN));
|
||||
}
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
return Err(Error::new(EAGAIN));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user