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:
@@ -118,12 +118,9 @@ ConditionVariableEntry::Wait(const void* object, uint32 flags,
|
|||||||
|
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
ConditionVariableEntry::AddToVariable(ConditionVariable* variable)
|
ConditionVariableEntry::AddToLockedVariable(ConditionVariable* variable)
|
||||||
{
|
{
|
||||||
fThread = get_current_thread();
|
fThread = get_current_thread();
|
||||||
|
|
||||||
MutexLocker _(sConditionVariablesLock);
|
|
||||||
|
|
||||||
fVariable = variable;
|
fVariable = variable;
|
||||||
fWaitStatus = STATUS_ADDED;
|
fWaitStatus = STATUS_ADDED;
|
||||||
fVariable->fEntries.Add(this);
|
fVariable->fEntries.Add(this);
|
||||||
@@ -180,7 +177,8 @@ ConditionVariable::Unpublish()
|
|||||||
void
|
void
|
||||||
ConditionVariable::Add(ConditionVariableEntry* entry)
|
ConditionVariable::Add(ConditionVariableEntry* entry)
|
||||||
{
|
{
|
||||||
entry->AddToVariable(this);
|
MutexLocker _(sConditionVariablesLock);
|
||||||
|
entry->AddToLockedVariable(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user