diff options
| author | Matthew Barnes <mbarnes@redhat.com> | 2007-02-23 18:06:18 +0000 |
|---|---|---|
| committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-02-23 18:06:18 +0000 |
| commit | 518f4b70d2b8536dcda3e817fed59a23c5891502 (patch) | |
| tree | 8704ce63192724fd901d1fbb6762aa06938afc98 /camel/camel-text-index.c | |
| parent | 7650b4cb47d1b5b783e085b6a0a3408fa644445e (diff) | |
| download | evolution-data-server-518f4b70d2b8536dcda3e817fed59a23c5891502.tar.gz | |
** Fixes bug #356177
2007-02-23 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #356177
* libedataserver/e-msgport.h: Deprecate EMutex.
* camel/camel-folder.c:
* camel/camel-object.c:
* camel/camel-private.h:
* camel/camel-provider.c:
* camel/camel-service.c:
* camel/camel-store.c:
* camel/camel-text-index.c:
* camel/providers/groupwise/camel-groupwise-folder.c:
* camel/providers/groupwise/camel-groupwise-private.h:
* camel/providers/groupwise/camel-groupwise-store.c:
* camel/providers/imap/camel-imap-command.c:
* camel/providers/imap/camel-imap-folder.c:
* camel/providers/imap/camel-imap-private.h:
* camel/providers/imap/camel-imap-store.c:
* camel/providers/imap4/camel-imap4-folder.c:
* camel/providers/imap4/camel-imap4-store.c:
* camel/providers/nntp/camel-nntp-folder.c:
* camel/providers/nntp/camel-nntp-store.c:
Migrate from EMutex to GStaticMutex or GStaticRecMutex.
svn path=/trunk/; revision=7628
Diffstat (limited to 'camel/camel-text-index.c')
| -rw-r--r-- | camel/camel-text-index.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c index 264716d98..9bda07896 100644 --- a/camel/camel-text-index.c +++ b/camel/camel-text-index.c @@ -55,8 +55,10 @@ #define CAMEL_TEXT_INDEX_MAX_WORDLEN (36) -#define CAMEL_TEXT_INDEX_LOCK(kf, lock) (e_mutex_lock(((CamelTextIndex *)kf)->priv->lock)) -#define CAMEL_TEXT_INDEX_UNLOCK(kf, lock) (e_mutex_unlock(((CamelTextIndex *)kf)->priv->lock)) +#define CAMEL_TEXT_INDEX_LOCK(kf, lock) \ + (g_static_rec_mutex_lock(&((CamelTextIndex *)kf)->priv->lock)) +#define CAMEL_TEXT_INDEX_UNLOCK(kf, lock) \ + (g_static_rec_mutex_unlock(&((CamelTextIndex *)kf)->priv->lock)) static int text_index_compress_nosync(CamelIndex *idx); @@ -125,7 +127,7 @@ struct _CamelTextIndexPrivate { int word_cache_count; EDList word_cache; GHashTable *words; - EMutex *lock; + GStaticRecMutex lock; }; /* Root block of text index */ @@ -760,7 +762,7 @@ camel_text_index_init(CamelTextIndex *idx) with moderate memory usage. Doubling the memory usage barely affects performance. */ p->word_cache_limit = 4096; /* 1024 = 128K */ - p->lock = e_mutex_new(E_MUTEX_REC); + g_static_rec_mutex_init(&p->lock); } static void @@ -789,7 +791,7 @@ camel_text_index_finalise(CamelTextIndex *idx) if (p->links) camel_object_unref((CamelObject *)p->links); - e_mutex_destroy(p->lock); + g_static_rec_mutex_free(&p->lock); g_free(p); } |
