#include <stdlib.h>
#include <cstring>
#include <map>
-#include "jthread/jmutex.h"
-#include "jthread/jmutexautolock.h"
+#include "threading/mutex.h"
+#include "threading/mutex_auto_lock.h"
#include "config.h"
#ifdef _MSC_VER
}
std::map<threadid_t, DebugStack*> g_debug_stacks;
-JMutex g_debug_stacks_mutex;
+Mutex g_debug_stacks_mutex;
void debug_stacks_init()
{
void debug_stacks_print_to(std::ostream &os)
{
- JMutexAutoLock lock(g_debug_stacks_mutex);
+ MutexAutoLock lock(g_debug_stacks_mutex);
os<<"Debug stacks:"<<std::endl;
void debug_stacks_print()
{
- JMutexAutoLock lock(g_debug_stacks_mutex);
+ MutexAutoLock lock(g_debug_stacks_mutex);
DEBUGPRINT("Debug stacks:\n");
{
threadid_t threadid = get_current_thread_id();
- JMutexAutoLock lock(g_debug_stacks_mutex);
+ MutexAutoLock lock(g_debug_stacks_mutex);
std::map<threadid_t, DebugStack*>::iterator n;
n = g_debug_stacks.find(threadid);
DebugStacker::~DebugStacker()
{
- JMutexAutoLock lock(g_debug_stacks_mutex);
+ MutexAutoLock lock(g_debug_stacks_mutex);
if(m_overflowed == true)
return;