diff options
author | Dan Winship <danw@src.gnome.org> | 2001-05-02 03:16:14 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-05-02 03:16:14 +0800 |
commit | 6a5e6fbbeaa4e32cd2058019ae87132beba79429 (patch) | |
tree | 1a99e8c747947e8fe3e65d3a94aa36aeda91cf61 /camel/providers/imap/camel-imap-private.h | |
parent | 4ce894e3ab34ee81967f1d69dfba71eb9f3c0944 (diff) | |
download | gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.gz gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.bz2 gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.lz gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.xz gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.zst gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.zip |
Redo command locking. Since command_lock is recursive, we can just get a
* providers/imap/camel-imap-command.c (camel_imap_command): Redo
command locking. Since command_lock is recursive, we can just get
a lock here, and release it either on error, or when the caller
frees the response data. (This simplifies a lot of stuff, and
fixes some problems with camel_imap_folder_changed being called
without the command_lock locked because of the 2001-03-22 change.)
(camel_imap_response_free):
(camel_imap_response_free_without_processing):
(camel_imap_response_extract):
(camel_imap_response_extract_continuation): These all take a
CamelImapStore now as well, to deal with locking.
* providers/imap/camel-imap-private.h: Add
CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
be made to call e_mutex_assert_locked.
* providers/imap/camel-imap-folder.c, camel-imap-search.c,
camel-imap-store.c: Simplify using new locking stuff. Add a few
CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
svn path=/trunk/; revision=9639
Diffstat (limited to 'camel/providers/imap/camel-imap-private.h')
-rw-r--r-- | camel/providers/imap/camel-imap-private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/camel/providers/imap/camel-imap-private.h b/camel/providers/imap/camel-imap-private.h index 811efc5576..6004840f88 100644 --- a/camel/providers/imap/camel-imap-private.h +++ b/camel/providers/imap/camel-imap-private.h @@ -47,9 +47,15 @@ struct _CamelImapStorePrivate { #ifdef ENABLE_THREADS #define CAMEL_IMAP_STORE_LOCK(f, l) (e_mutex_lock(((CamelImapStore *)f)->priv->l)) #define CAMEL_IMAP_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelImapStore *)f)->priv->l)) +# if 0 +# define CAMEL_IMAP_STORE_ASSERT_LOCKED(f, l) (e_mutex_assert_locked(((CamelImapStore *)f)->priv->l)) +# else +# define CAMEL_IMAP_STORE_ASSERT_LOCKED(f, l) +# endif #else #define CAMEL_IMAP_STORE_LOCK(f, l) #define CAMEL_IMAP_STORE_UNLOCK(f, l) +#define CAMEL_IMAP_STORE_ASSERT_LOCKED(f, l) #endif struct _CamelImapFolderPrivate { |