mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 01:35:46 +00:00
Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.
This will be useful when implementing mutex priority inheritance.
This commit is contained in:
parent
a1718862e3
commit
90570c153b
17 changed files with 56 additions and 68 deletions
|
@ -27,12 +27,12 @@ namespace Kernel {
|
|||
/// Event type for the thread wake up event
|
||||
static int ThreadWakeupEventType;
|
||||
|
||||
bool Thread::ShouldWait() {
|
||||
bool Thread::ShouldWait(Thread* thread) const {
|
||||
return status != THREADSTATUS_DEAD;
|
||||
}
|
||||
|
||||
void Thread::Acquire() {
|
||||
ASSERT_MSG(!ShouldWait(), "object unavailable!");
|
||||
void Thread::Acquire(Thread* thread) {
|
||||
ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
|
||||
}
|
||||
|
||||
// TODO(yuriks): This can be removed if Thread objects are explicitly pooled in the future, allowing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue