fCachedStack needs to be initialized and reset when the looper is unlocked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21864 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -522,6 +522,7 @@ PRINT((" fOwnerCount now: %ld\n", fOwnerCount));
|
|||||||
if (fOwnerCount == 0) {
|
if (fOwnerCount == 0) {
|
||||||
// Set fOwner to invalid thread_id (< 0)
|
// Set fOwner to invalid thread_id (< 0)
|
||||||
fOwner = -1;
|
fOwner = -1;
|
||||||
|
fCachedStack = 0;
|
||||||
|
|
||||||
#if DEBUG < 1
|
#if DEBUG < 1
|
||||||
// Decrement requested lock count (using fAtomicCount for this)
|
// Decrement requested lock count (using fAtomicCount for this)
|
||||||
@@ -935,6 +936,7 @@ void
|
|||||||
BLooper::_InitData(const char *name, int32 priority, int32 portCapacity)
|
BLooper::_InitData(const char *name, int32 priority, int32 portCapacity)
|
||||||
{
|
{
|
||||||
fOwner = B_ERROR;
|
fOwner = B_ERROR;
|
||||||
|
fCachedStack = 0;
|
||||||
fRunCalled = false;
|
fRunCalled = false;
|
||||||
fDirectTarget = new (std::nothrow) BPrivate::BDirectMessageTarget();
|
fDirectTarget = new (std::nothrow) BPrivate::BDirectMessageTarget();
|
||||||
fCommonFilters = NULL;
|
fCommonFilters = NULL;
|
||||||
@@ -1401,6 +1403,7 @@ BLooper::UnlockFully()
|
|||||||
fOwnerCount = 0;
|
fOwnerCount = 0;
|
||||||
// Nobody owns the lock now
|
// Nobody owns the lock now
|
||||||
fOwner = -1;
|
fOwner = -1;
|
||||||
|
fCachedStack = 0;
|
||||||
#if DEBUG < 1
|
#if DEBUG < 1
|
||||||
// There is now one less thread holding a lock on this looper
|
// There is now one less thread holding a lock on this looper
|
||||||
int32 atomicCount = atomic_add(&fAtomicCount, -1);
|
int32 atomicCount = atomic_add(&fAtomicCount, -1);
|
||||||
|
|||||||
Reference in New Issue
Block a user