Now drops into the debugger if the window/looper is still locked in task_looper().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13480 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-07-06 04:52:58 +00:00
parent 4c3e1ace67
commit b93d2480cc
2 changed files with 18 additions and 28 deletions
+15 -28
View File
@@ -1,29 +1,15 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2005, Haiku * Copyright 2001-2005, Haiku.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Authors:
// to deal in the Software without restriction, including without limitation * Erik Jaesler ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, * DarkWyrm ([email protected])
// and/or sell copies of the Software, and to permit persons to whom the * Ingo Weinhold, bonefish@@users.sf.net
// Software is furnished to do so, subject to the following conditions: * Axel Dörfler, [email protected]
// */
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software. /** BLooper class spawns a thread that runs a message loop. */
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: Looper.cpp
// Author(s): Erik Jaesler ([email protected])
// DarkWyrm ([email protected])
// Description: BLooper class spawns a thread that runs a message loop.
//------------------------------------------------------------------------------
/** /**
@note Although I'm implementing "by the book" for now, I would like to @note Although I'm implementing "by the book" for now, I would like to
@@ -31,8 +17,6 @@
into their own class in the BPrivate namespace. into their own class in the BPrivate namespace.
Also considering adding the thread priority when archiving. Also considering adding the thread priority when archiving.
*/ */
// debugging // debugging
@@ -1211,6 +1195,9 @@ BLooper::task_looper()
// Unlock the looper // Unlock the looper
Unlock(); Unlock();
if (IsLocked())
debugger("looper must not be locked!");
// loop: As long as we are not terminating. // loop: As long as we are not terminating.
while (!fTerminating) while (!fTerminating)
{ {
+3
View File
@@ -2140,6 +2140,9 @@ BWindow::task_looper()
// Unlock the looper // Unlock the looper
Unlock(); Unlock();
if (IsLocked())
debugger("window must not be locked!");
// loop: As long as we are not terminating. // loop: As long as we are not terminating.
while (!fTerminating) { while (!fTerminating) {
// TODO: timeout determination algo // TODO: timeout determination algo