aboutsummaryrefslogtreecommitdiffstats
path: root/src/mem_pool.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-02-13 21:51:10 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-02-13 21:51:10 +0400
commita5b48a05a94d178c342bbad69a330addb518d148 (patch)
treeee7ab452cd4a98fdb7503e78cc52a3d4f66dd27e /src/mem_pool.h
parent0d64c808b7310b6e233ec570649fbb281a3f2b13 (diff)
downloadrspamd-a5b48a05a94d178c342bbad69a330addb518d148.tar.gz
rspamd-a5b48a05a94d178c342bbad69a330addb518d148.zip
* More things to be thread-safe:
- pool allocator is now thread-safe - lua subsystem now holds lock to avoid lua stack corruption - events subsystem now using conditional variables to wait for async_threads - insert_result is thread-safe now
Diffstat (limited to 'src/mem_pool.h')
-rw-r--r--src/mem_pool.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mem_pool.h b/src/mem_pool.h
index 62f6dcb9a..475a00629 100644
--- a/src/mem_pool.h
+++ b/src/mem_pool.h
@@ -76,6 +76,11 @@ typedef struct memory_pool_s {
struct _pool_chain_shared *shared_pool; /**< shared chain */
struct _pool_destructors *destructors; /**< destructors chain */
GHashTable *variables; /**< private memory pool variables */
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30))
+ GStaticMutex mtx; /**< threads lock */
+#else
+ GMutex mtx; /**< threads lock */
+#endif
} memory_pool_t;
/**