aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/ibex_internal.h
diff options
context:
space:
mode:
author1 <NotZed@Ximian.com>2001-11-01 03:58:02 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-11-01 03:58:02 +0800
commitb40eb5b8a47737304a6df0bb379b3a6ed83b062a (patch)
treed999678a9375dfa72d8ad2cb116ee1fff3a21e24 /libibex/ibex_internal.h
parent72ab189eac80cff19d8debdf524327ff9dd1a1e2 (diff)
downloadgsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.tar
gsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.tar.gz
gsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.tar.bz2
gsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.tar.lz
gsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.tar.xz
gsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.tar.zst
gsoc2013-evolution-b40eb5b8a47737304a6df0bb379b3a6ed83b062a.zip
Added a trylock, used by ibex_use.
2001-10-31 <NotZed@Ximian.com> * ibex_internal.h (IBEX_TRYLOCK): Added a trylock, used by ibex_use. * ibex_block.c (ibex_use): Do to a trylock on the ibex we're checking to close, as it might be locked elsewhere in an obivously simple deadlock. svn path=/trunk/; revision=14547
Diffstat (limited to 'libibex/ibex_internal.h')
-rw-r--r--libibex/ibex_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libibex/ibex_internal.h b/libibex/ibex_internal.h
index 1ae2b66146..321b596f2a 100644
--- a/libibex/ibex_internal.h
+++ b/libibex/ibex_internal.h
@@ -52,8 +52,10 @@ struct ibex {
#define IBEX_UNLOCK(ib) (printf(__FILE__ "%d: %s: unlocking ibex\n", __LINE__, __FUNCTION__), g_mutex_unlock(ib->lock))*/
#define IBEX_LOCK(ib) (g_mutex_lock(ib->lock))
#define IBEX_UNLOCK(ib) (g_mutex_unlock(ib->lock))
+#define IBEX_TRYLOCK(ib) (g_mutex_trylock(ib->lock))
#else
#define IBEX_LOCK(ib)
#define IBEX_UNLOCK(ib)
+#define IBEX_TRYLOCK(ib) (0)
#endif