From 46a374ff40fda765aaf26365f3ba08aa68d67645 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 11 Jun 2004 19:29:03 +0000 Subject: [PATCH] check CRASH_HANDLER --- stepmania/src/RageThreads.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageThreads.cpp b/stepmania/src/RageThreads.cpp index 68227cc52c..3be50a8a13 100644 --- a/stepmania/src/RageThreads.cpp +++ b/stepmania/src/RageThreads.cpp @@ -22,12 +22,13 @@ #include "arch/Threads/Threads.h" +#if defined(CRASH_HANDLER) #if defined(WIN32) #include "archutils/Win32/crash.h" -#endif -#if defined(CRASH_HANDLER) +#elif defined(UNIX) #include "archutils/Unix/CrashHandler.h" #endif +#endif #define MAX_THREADS 128 //static vector *g_MutexList = NULL; /* watch out for static initialization order problems */ @@ -512,8 +513,12 @@ void RageMutex::Lock() ThisSlot? ThisSlot->GetThreadName(): "(???" ")", // stupid trigraph warnings OtherSlot? OtherSlot->GetThreadName(): "(???" ")" ); +#if defined(CRASH_HANDLER) /* Pass the crash handle of the other thread, so it can backtrace that thread. */ ForceCrashHandlerDeadlock( sReason, OtherSlot? OtherSlot->pImpl->GetCrashHandle():0 ); +#else + RageException::Throw( "%s", sReason ); +#endif } m_LockedBy = GetThisThreadId();