mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
Kernel: Rename functions to be less confusing
Thread::yield_and_release_relock_big_lock releases the big lock, yields and then relocks the big lock. Thread::yield_assuming_not_holding_big_lock yields assuming the big lock is not being held.
This commit is contained in:
parent
0536a4ff41
commit
704e1c2e3d
3 changed files with 12 additions and 11 deletions
|
@ -819,7 +819,7 @@ public:
|
|||
while (state() == Thread::Stopped) {
|
||||
lock.unlock();
|
||||
// We shouldn't be holding the big lock here
|
||||
yield_while_not_holding_big_lock();
|
||||
yield_assuming_not_holding_big_lock();
|
||||
lock.lock();
|
||||
}
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ public:
|
|||
// Yield to the scheduler, and wait for us to resume unblocked.
|
||||
VERIFY(!g_scheduler_lock.own_lock());
|
||||
VERIFY(Processor::current().in_critical());
|
||||
yield_while_not_holding_big_lock();
|
||||
yield_assuming_not_holding_big_lock();
|
||||
VERIFY(Processor::current().in_critical());
|
||||
|
||||
ScopedSpinLock block_lock2(m_block_lock);
|
||||
|
@ -1341,8 +1341,8 @@ private:
|
|||
|
||||
bool m_is_profiling_suppressed { false };
|
||||
|
||||
void yield_without_holding_big_lock();
|
||||
void yield_while_not_holding_big_lock();
|
||||
void yield_and_release_relock_big_lock();
|
||||
void yield_assuming_not_holding_big_lock();
|
||||
void drop_thread_count(bool);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue