aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-private.h
diff options
context:
space:
mode:
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 */