Make semaphore always sched_yield
This commit is contained in:
@@ -29,7 +29,8 @@ impl Semaphore {
|
||||
}
|
||||
loop {
|
||||
while self.lock.load(Ordering::Acquire) < 1 {
|
||||
spin_loop();
|
||||
//spin_loop();
|
||||
Sys::sched_yield();
|
||||
}
|
||||
let tmp = self.lock.fetch_sub(1, Ordering::AcqRel);
|
||||
if tmp >= 1 {
|
||||
|
||||
Reference in New Issue
Block a user