aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-private.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-06-28 06:43:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-06-28 06:43:00 +0800
commit3797918d013db678b61d62956ed14ad50e7b70e1 (patch)
tree62a8952d650f0013e99f5519b084398f6a3459b8 /camel/camel-private.h
parent5a223c85b94c5cc51fe5e830665cabd981e4c75b (diff)
downloadgsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.tar
gsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.tar.gz
gsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.tar.bz2
gsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.tar.lz
gsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.tar.xz
gsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.tar.zst
gsoc2013-evolution-3797918d013db678b61d62956ed14ad50e7b70e1.zip
Initialize the private send_lock. (camel_transport_finalize): Free the
2001-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-transport.c (camel_transport_init): Initialize the private send_lock. (camel_transport_finalize): Free the private send_lock. (camel_transport_get_type): Set the init and finalize functions. (camel_transport_send): Lock the transport. (camel_transport_send_to): Same. * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros. svn path=/trunk/; revision=10547
Diffstat (limited to 'camel/camel-private.h')
-rw-r--r--camel/camel-private.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/camel/camel-private.h b/camel/camel-private.h
index fa9b50a8a0..f63a452a4c 100644
--- a/camel/camel-private.h
+++ b/camel/camel-private.h
@@ -73,6 +73,20 @@ struct _CamelStorePrivate {
#define CAMEL_STORE_UNLOCK(f, l)
#endif
+struct _CamelTransportPrivate {
+#ifdef ENABLE_THREADS
+ GMutex *send_lock; /* for locking send operations */
+#endif
+};
+
+#ifdef ENABLE_THREADS
+#define CAMEL_TRANSPORT_LOCK(f, l) (g_mutex_lock(((CamelTransport *)f)->priv->l))
+#define CAMEL_TRANSPORT_UNLOCK(f, l) (g_mutex_unlock(((CamelTransport *)f)->priv->l))
+#else
+#define CAMEL_TRANSPORT_LOCK(f, l)
+#define CAMEL_TRANSPORT_UNLOCK(f, l)
+#endif
+
struct _CamelServicePrivate {
#ifdef ENABLE_THREADS
EMutex *connect_lock; /* for locking connection operations */