summaryrefslogtreecommitdiff
path: root/src/mutex.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-01-28 08:53:35 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-01-28 08:53:35 +0100
commitc708ca4491adadd3994b625e1bb4b528eb15cd7c (patch)
tree923fe4ff947ce2b714bc7258b863c5e5b886fa41 /src/mutex.cc
parent1662fa8a8197e62b9df3ce5ecc6f1032800a07fe (diff)
Added debug
Diffstat (limited to 'src/mutex.cc')
-rw-r--r--src/mutex.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mutex.cc b/src/mutex.cc
index e01bc95..75d569d 100644
--- a/src/mutex.cc
+++ b/src/mutex.cc
@@ -71,6 +71,10 @@ Mutex::~Mutex()
bool Mutex::try_lock()
{
#ifdef WIN32
+ DEBUG(mutex, "%s\n", __PRETTY_FUNCTION__);
+ DEBUG(mutex, "WAIT_OBJECT_0: %d, WaitForSingleObject: %d\n",
+ WAIT_OBJECT_0, WaitForSingleObject(prv->mutex, 0));
+
return WaitForSingleObject(prv->mutex, 0) == WAIT_OBJECT_0;
#else
return pthread_mutex_trylock(&prv->mutex) != EBUSY;