axeld + bonefish:
Changed condition variables so that it is allowed to block (e.g. lock mutexes etc.) between Add() and Wait(). This fixes #2059, since the block writer used them this way and could thusly fail to wait for a condition variable, causing a temporary stack object to be used past its lifetime. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25525 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,9 +27,8 @@ public:
|
||||
inline ~ConditionVariableEntry();
|
||||
#endif
|
||||
|
||||
bool Add(const void* object, uint32 flags = 0);
|
||||
status_t Wait(uint32 timeoutFlags = 0,
|
||||
bigtime_t timeout = 0);
|
||||
bool Add(const void* object);
|
||||
status_t Wait(uint32 flags = 0, bigtime_t timeout = 0);
|
||||
status_t Wait(const void* object, uint32 flags = 0,
|
||||
bigtime_t timeout = 0);
|
||||
|
||||
@@ -42,6 +41,7 @@ private:
|
||||
private:
|
||||
ConditionVariable* fVariable;
|
||||
struct thread* fThread;
|
||||
status_t fWaitStatus;
|
||||
|
||||
friend class ConditionVariable;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user