aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-private.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-11-03 07:53:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-11-03 07:53:36 +0800
commitd2e6a28e22a2352d4622265693405b3f193c6aee (patch)
tree4881b7f8f2d4c53f8bc68c20c397b33a474e2599 /camel/camel-private.h
parentdc354f10e83c1a1aca64454ef45059af4b69279e (diff)
downloadgsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.tar
gsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.tar.gz
gsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.tar.bz2
gsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.tar.lz
gsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.tar.xz
gsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.tar.zst
gsoc2013-evolution-d2e6a28e22a2352d4622265693405b3f193c6aee.zip
Initialize our private mutex. (camel_data_wrapper_finalize): Destroy our
2001-11-02 Jeffrey Stedfast <fejj@ximian.com> * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our private mutex. (camel_data_wrapper_finalize): Destroy our private mutex. (write_to_stream): Lock around camel_stream_write_to_stream() so that we don't get 2 threads trying to read from our stream at the same time. svn path=/trunk/; revision=14573
Diffstat (limited to 'camel/camel-private.h')
-rw-r--r--camel/camel-private.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/camel/camel-private.h b/camel/camel-private.h
index c6a31575e0..b73ef9a36d 100644
--- a/camel/camel-private.h
+++ b/camel/camel-private.h
@@ -183,9 +183,24 @@ struct _CamelVeeFolderPrivate {
#define CAMEL_VEE_FOLDER_UNLOCK(f, l)
#endif
+struct _CamelDataWrapperPrivate {
+#ifdef ENABLE_THREADS
+ pthread_mutex_t stream_lock;
+#else
+ gpointer dummy;
+#endif
+};
+
+#ifdef ENABLE_THREADS
+#define CAMEL_DATA_WRAPPER_LOCK(dw, l) (pthread_mutex_lock(&((CamelDataWrapper *)dw)->priv->l))
+#define CAMEL_DATA_WRAPPER_UNLOCK(dw, l) (pthread_mutex_unlock(&((CamelDataWrapper *)dw)->priv->l))
+#else
+#define CAMEL_DATA_WRAPPER_LOCK(dw, l)
+#define CAMEL_DATA_WRAPPER_UNLOCK(dw, l)
+#endif
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* CAMEL_H */
-
+#endif /* CAMEL_PRIVATE_H */