aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-msgport.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-02 01:37:31 +0800
committerDan Winship <danw@src.gnome.org>2001-05-02 01:37:31 +0800
commit4ce894e3ab34ee81967f1d69dfba71eb9f3c0944 (patch)
tree7f9ece319afcf4dc94349b7ba60de003c3d1e9d7 /e-util/e-msgport.c
parenteba2691d5dbd944058b5c7645f0ced9bcfee6e72 (diff)
downloadgsoc2013-evolution-4ce894e3ab34ee81967f1d69dfba71eb9f3c0944.tar.gz
gsoc2013-evolution-4ce894e3ab34ee81967f1d69dfba71eb9f3c0944.tar.zst
gsoc2013-evolution-4ce894e3ab34ee81967f1d69dfba71eb9f3c0944.zip
Debugging routine. (Only works for recursive mutexes right now.)
* e-msgport.c (e_mutex_assert_locked): Debugging routine. (Only works for recursive mutexes right now.) svn path=/trunk/; revision=9638
Diffstat (limited to 'e-util/e-msgport.c')
-rw-r--r--e-util/e-msgport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/e-util/e-msgport.c b/e-util/e-msgport.c
index 683aa85d78..d034f0deaf 100644
--- a/e-util/e-msgport.c
+++ b/e-util/e-msgport.c
@@ -758,6 +758,14 @@ int e_mutex_unlock(EMutex *m)
return -1;
}
+void e_mutex_assert_locked(EMutex *m)
+{
+ g_return_if_fail (m->type == E_MUTEX_REC);
+ pthread_mutex_lock(&m->mutex);
+ g_assert(m->owner == pthread_self());
+ pthread_mutex_unlock(&m->mutex);
+}
+
#ifdef STANDALONE
EMsgPort *server_port;