bonefish + axeld:

* Removed the superfluous "flags" parameter from ConditionVariable::Add()
  that we forgot there when we moved the flags field from
  ConditionVariableEntry::Add() to Wait().
* Using this method was therefore not a good idea - only UnixFifo did, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26454 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-07-16 22:43:50 +00:00
parent 2293ed6941
commit cb9191556c
3 changed files with 20 additions and 22 deletions
+4 -7
View File
@@ -171,17 +171,14 @@ ConditionVariableEntry::Wait(const void* object, uint32 flags,
inline void
ConditionVariableEntry::AddToVariable(ConditionVariable* variable, uint32 flags)
ConditionVariableEntry::AddToVariable(ConditionVariable* variable)
{
fThread = thread_get_current_thread();
thread_prepare_to_block(fThread, flags,
THREAD_BLOCK_TYPE_CONDITION_VARIABLE, fVariable);
// add to the variable
InterruptsSpinLocker _(sConditionVariablesLock);
fVariable = variable;
fWaitStatus = STATUS_ADDED;
fVariable->fEntries.Add(this);
}
@@ -246,9 +243,9 @@ ConditionVariable::Unpublish(bool threadsLocked)
void
ConditionVariable::Add(ConditionVariableEntry* entry, uint32 flags)
ConditionVariable::Add(ConditionVariableEntry* entry)
{
entry->AddToVariable(this, flags);
entry->AddToVariable(this);
}