kernelland_emu: Adapt to new ConditionVariable API.

This could use some optimizations, but it's only used by
userlandfs for now.
This commit is contained in:
Augustin Cavalier 2019-08-03 11:46:05 -04:00
parent 37eda488be
commit 2f1e2ae469

View File

@ -118,12 +118,9 @@ ConditionVariableEntry::Wait(const void* object, uint32 flags,
inline void
ConditionVariableEntry::AddToVariable(ConditionVariable* variable)
ConditionVariableEntry::AddToLockedVariable(ConditionVariable* variable)
{
fThread = get_current_thread();
MutexLocker _(sConditionVariablesLock);
fVariable = variable;
fWaitStatus = STATUS_ADDED;
fVariable->fEntries.Add(this);
@ -180,7 +177,8 @@ ConditionVariable::Unpublish()
void
ConditionVariable::Add(ConditionVariableEntry* entry)
{
entry->AddToVariable(this);
MutexLocker _(sConditionVariablesLock);
entry->AddToLockedVariable(this);
}