aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-26 21:13:19 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-26 21:13:19 +0400
commit608432786ad77ce7ce071dd975d6c59d503d2302 (patch)
treed3991e93c04b0eef602afab272e7316490ba1d54 /src/buffer.h
parent2e15cacc80101d91108be8aaa4ea722f31d22d6b (diff)
downloadrspamd-608432786ad77ce7ce071dd975d6c59d503d2302.tar.gz
rspamd-608432786ad77ce7ce071dd975d6c59d503d2302.zip
* Use event_base thread safe API to allow parallelism based on threads
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 16394ae7d..51b321833 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -52,6 +52,7 @@ typedef struct rspamd_io_dispatcher_s {
gboolean in_sendfile; /**< whether buffer is in sendfile mode */
gboolean strip_eol; /**< strip or not line ends in BUFFER_LINE policy */
gboolean is_restored; /**< call a callback when dispatcher is restored */
+ struct event_base *ev_base; /**< event base for io operations */
#ifndef HAVE_SENDFILE
void *map;
#endif
@@ -68,7 +69,7 @@ typedef struct rspamd_io_dispatcher_s {
* @param user_data pointer to user's data
* @return new dispatcher object or NULL in case of failure
*/
-rspamd_io_dispatcher_t* rspamd_create_dispatcher (gint fd,
+rspamd_io_dispatcher_t* rspamd_create_dispatcher (struct event_base *base, gint fd,
enum io_policy policy,
dispatcher_read_callback_t read_cb,
dispatcher_write_callback_t write_cb,