diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-07-10 03:05:13 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-07-10 03:05:13 +0800 |
commit | 2bd47d3cda52acc0beb688ffb4a8202412de5c09 (patch) | |
tree | 66b1a9f93e8b5bfdeb8c9350bda05f98d3e7eeca /camel/camel-vee-folder.c | |
parent | 16ce509ec02a99acf7324c4e157cf1cf781a8a67 (diff) | |
download | gsoc2013-evolution-2bd47d3cda52acc0beb688ffb4a8202412de5c09.tar.gz gsoc2013-evolution-2bd47d3cda52acc0beb688ffb4a8202412de5c09.tar.zst gsoc2013-evolution-2bd47d3cda52acc0beb688ffb4a8202412de5c09.zip |
Get rid of the #ifdef ENABLE_THREADS since we no longer plan to
2003-07-09 Jeffrey Stedfast <fejj@ximian.com>
* camel-block-file.c: Get rid of the #ifdef ENABLE_THREADS since
we no longer plan to support/maintain this.
* camel.c: Same.
* camel-certdb.c: Here too.
* camel-charset-map.c: And here.
* camel-cipher-context.c: "
* camel-data-wrapper.c: "
* camel-digest-folder.c: "
* camel-exception.c: "
* camel-folder.c: "
* camel-folder-summary.c: "
* camel-lock-client.c: "
* camel-mime-utils.c: "
* camel-object.c: "
* camel-operation.c: "
* camel-partition-table.c: "
* camel-sasl-popb4smtp.c: "
* camel-service.c: "
* camel-session.c: "
* camel-store.c: "
* camel-store-summary.c: "
* camel-text-index.c: "
* camel-transport.c: "
* camel-vee-folder.c: "
* camel-tcp-stream-openssl.c: Removed pthread.h, it isn't needed.
svn path=/trunk/; revision=21777
Diffstat (limited to 'camel/camel-vee-folder.c')
-rw-r--r-- | camel/camel-vee-folder.c | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 805f800b60..c17f7a0bde 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -1,5 +1,6 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 2000 Ximian Inc. + * Copyright (C) 2000-2003 Ximian Inc. * * Authors: Michael Zucchi <notzed@ximian.com> * Jeffrey Stedfast <fejj@ximian.com> @@ -24,6 +25,7 @@ #endif #include <string.h> +#include <pthread.h> #include "camel-exception.h" #include "camel-vee-folder.h" @@ -87,16 +89,11 @@ static CamelFolderClass *camel_vee_folder_parent; /* use folder_unmatched->summary_lock for access to unmatched_uids or appropriate internals, for consistency */ static CamelVeeFolder *folder_unmatched; static GHashTable *unmatched_uids; /* a refcount of uid's that are matched by any rules */ -#ifdef ENABLE_THREADS -#include <pthread.h> static pthread_mutex_t unmatched_lock = PTHREAD_MUTEX_INITIALIZER; /* only used to initialise folder_unmatched */ #define UNMATCHED_LOCK() pthread_mutex_lock(&unmatched_lock) #define UNMATCHED_UNLOCK() pthread_mutex_unlock(&unmatched_lock) -#else -#define UNMATCHED_LOCK() -#define UNMATCHED_UNLOCK() -#endif + CamelType camel_vee_folder_get_type (void) @@ -164,13 +161,10 @@ camel_vee_folder_init (CamelVeeFolder *obj) obj->changes = camel_folder_change_info_new(); obj->search = camel_folder_search_new(); - -#ifdef ENABLE_THREADS + p->summary_lock = g_mutex_new(); p->subfolder_lock = g_mutex_new(); p->changed_lock = g_mutex_new(); -#endif - } static void @@ -206,12 +200,11 @@ camel_vee_folder_finalise (CamelObject *obj) camel_folder_change_info_free(vf->changes); camel_object_unref((CamelObject *)vf->search); - -#ifdef ENABLE_THREADS + g_mutex_free(p->summary_lock); g_mutex_free(p->subfolder_lock); g_mutex_free(p->changed_lock); -#endif + g_free(p); } @@ -1367,9 +1360,7 @@ folder_changed_change_uid(CamelFolder *sub, const char *uid, const char hash[8], } struct _folder_changed_msg { -#ifdef ENABLE_THREADS CamelSessionThreadMsg msg; -#endif CamelFolderChangeInfo *changes; CamelFolder *sub; CamelVeeFolder *vf; @@ -1600,20 +1591,17 @@ folder_changed_free(CamelSession *session, CamelSessionThreadMsg *msg) camel_object_unref((CamelObject *)m->sub); } -#ifdef ENABLE_THREADS static CamelSessionThreadOps folder_changed_ops = { folder_changed_change, folder_changed_free, }; -#endif static void folder_changed(CamelFolder *sub, CamelFolderChangeInfo *changes, CamelVeeFolder *vf) { struct _folder_changed_msg *m; CamelSession *session = ((CamelService *)((CamelFolder *)vf)->parent_store)->session; - -#ifdef ENABLE_THREADS + m = camel_session_thread_msg_new(session, &folder_changed_ops, sizeof(*m)); m->changes = camel_folder_change_info_new(); camel_folder_change_info_cat(m->changes, changes); @@ -1622,15 +1610,6 @@ folder_changed(CamelFolder *sub, CamelFolderChangeInfo *changes, CamelVeeFolder m->vf = vf; camel_object_ref((CamelObject *)vf); camel_session_thread_queue(session, &m->msg, 0); -#else - m = g_malloc(sizeof(*m)); - m->changes = changes; - m->sub = sub; - m->vf = vf; - folder_changed_change(session, &m->msg); - folder_changed_free(&m->msg); - g_free(m); -#endif } /* track flag changes in the summary, we just promote it to a folder_changed event */ |