Author: erijo
Date: Wed Oct 27 23:41:03 2010
New Revision: 7950
Log:
Move DEBUG_RW_MUTEX definition to make it available to sighandler.cpp as well
Added:
trunk/licq/src/thread/readwritemutex_debug.h
Modified:
trunk/licq/src/sighandler.cpp
trunk/licq/src/thread/readwritemutex.cpp
Modified: trunk/licq/src/sighandler.cpp
==============================================================================
--- trunk/licq/src/sighandler.cpp (original)
+++ trunk/licq/src/sighandler.cpp Wed Oct 27 23:41:03 2010
@@ -8,6 +8,7 @@
#include "config.h"
#include "gettext.h"
+#include "thread/readwritemutex_debug.h"
#include <errno.h>
#include <stdio.h>
@@ -195,7 +196,7 @@
"%s\n"
#endif
"%s\n"
-#ifdef DEBUG_RW_MUTEX
+#ifdef LICQDAEMON_DEBUG_RW_MUTEX
"%slicq.debug_rw_mutex\n"
#endif
"\n"
@@ -205,7 +206,7 @@
btfile1.c_str(),
#endif
btfile2.c_str()
-#ifdef DEBUG_RW_MUTEX
+#ifdef LICQDAEMON_DEBUG_RW_MUTEX
, gDaemon.baseDir().c_str()
#endif
);
Modified: trunk/licq/src/thread/readwritemutex.cpp
==============================================================================
--- trunk/licq/src/thread/readwritemutex.cpp (original)
+++ trunk/licq/src/thread/readwritemutex.cpp Wed Oct 27 23:41:03 2010
@@ -17,12 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/*
- * Define DEBUG_RW_MUTEX and recompile the daemon to debug deadlocks. If a
- * (potential) deadlock is discovered, the daemon will print a message to
- * stderr (and to the file <basedir>/licq.debug_rw_mutex) and then abort.
- */
-#define DEBUG_RW_MUTEX
+#include "readwritemutex_debug.h"
#include <licq/thread/mutexlocker.h>
#include <licq/thread/readwritemutex.h>
@@ -32,7 +27,7 @@
using Licq::MutexLocker;
using Licq::ReadWriteMutex;
-#ifdef DEBUG_RW_MUTEX
+#ifdef LICQDAEMON_DEBUG_RW_MUTEX
#include "readwritemutex_debug.cpp"
#else
Added: trunk/licq/src/thread/readwritemutex_debug.h
==============================================================================
--- trunk/licq/src/thread/readwritemutex_debug.h (added)
+++ trunk/licq/src/thread/readwritemutex_debug.h Wed Oct 27 23:41:03 2010
@@ -1,0 +1,33 @@
+/*
+ * This file is part of Licq, an instant messaging client for UNIX.
+ * Copyright (C) 2010 Licq Developers <[email protected]>
+ *
+ * Please refer to the COPYRIGHT file distributed with this source
+ * distribution for the names of the individual contributors.
+ *
+ * Licq is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Licq is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Licq; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef LICQDAEMON_READWRITEMUTEX_DEBUG_H
+#define LICQDAEMON_READWRITEMUTEX_DEBUG_H
+
+/*
+ * Define this and recompile the daemon to debug deadlocks. If a (potential)
+ * deadlock is discovered, the daemon will print a message to stderr (and to
+ * the file <basedir>/licq.debug_rw_mutex) and then abort.
+ */
+#define LICQDAEMON_DEBUG_RW_MUTEX
+
+#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.