mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
Kernel: Make block() and yield() automatically call Scheduler::yield().
This exposed some places we were accidentally doing a double yield().
This commit is contained in:
parent
5713c3a0cb
commit
239c0bd6a6
6 changed files with 10 additions and 28 deletions
|
@ -83,6 +83,7 @@ public:
|
|||
dword ticks() const { return m_ticks; }
|
||||
pid_t waitee_pid() const { return m_waitee_pid; }
|
||||
|
||||
void sleep(dword ticks);
|
||||
void block(Thread::State);
|
||||
void unblock();
|
||||
|
||||
|
@ -167,8 +168,6 @@ private:
|
|||
extern InlineLinkedList<Thread>* g_threads;
|
||||
|
||||
const char* to_string(Thread::State);
|
||||
void block(Thread::State);
|
||||
void sleep(dword ticks);
|
||||
|
||||
template<typename Callback>
|
||||
inline void Thread::for_each_in_state(State state, Callback callback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue