RequestOwner::Wait(): No need to publish the condition variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35574 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -416,12 +416,12 @@ RequestOwner::Wait(bool interruptable, bigtime_t timeout)
|
|||||||
|
|
||||||
// publish the condition variable
|
// publish the condition variable
|
||||||
ConditionVariable conditionVariable;
|
ConditionVariable conditionVariable;
|
||||||
conditionVariable.Publish(this, "tty request");
|
conditionVariable.Init(this, "tty request");
|
||||||
fConditionVariable = &conditionVariable;
|
fConditionVariable = &conditionVariable;
|
||||||
|
|
||||||
// add an entry to wait on
|
// add an entry to wait on
|
||||||
ConditionVariableEntry entry;
|
ConditionVariableEntry entry;
|
||||||
entry.Add(this);
|
conditionVariable.Add(&entry);
|
||||||
|
|
||||||
locker.Unlock();
|
locker.Unlock();
|
||||||
|
|
||||||
@@ -438,7 +438,6 @@ RequestOwner::Wait(bool interruptable, bigtime_t timeout)
|
|||||||
// remove the condition variable
|
// remove the condition variable
|
||||||
locker.Lock();
|
locker.Lock();
|
||||||
fConditionVariable = NULL;
|
fConditionVariable = NULL;
|
||||||
conditionVariable.Unpublish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the result
|
// get the result
|
||||||
|
|||||||
Reference in New Issue
Block a user