syslog-ng source
mainloop-io-worker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2013 Balabit
3  * Copyright (c) 1998-2013 Balázs Scheidler
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 #ifndef MAINLOOP_IO_WORKER_H_INCLUDED
25 #define MAINLOOP_IO_WORKER_H_INCLUDED 1
26 
27 #include "mainloop-worker.h"
28 
29 #include <iv_work.h>
30 
31 typedef struct _MainLoopIOWorkerJob
32 {
33  void (*engage)(gpointer user_data);
34  void (*work)(gpointer user_data, gpointer arg);
35  void (*completion)(gpointer user_data, gpointer arg);
36  void (*release)(gpointer user_data);
37  gpointer user_data;
38  gpointer arg;
39  gboolean working;
40  struct iv_work_item work_item;
42 
44 gboolean main_loop_io_worker_job_submit(MainLoopIOWorkerJob *self, gpointer arg);
45 
46 #if SYSLOG_NG_HAVE_IV_WORK_POOL_SUBMIT_CONTINUATION
47 void main_loop_io_worker_job_submit_continuation(MainLoopIOWorkerJob *self, gpointer arg);
48 #endif
49 
50 void main_loop_io_worker_add_options(GOptionContext *ctx);
51 
52 void main_loop_io_worker_init(void);
54 
55 #endif
void main_loop_io_worker_add_options(GOptionContext *ctx)
Definition: mainloop-io-worker.c:169
void main_loop_io_worker_deinit(void)
Definition: mainloop-io-worker.c:157
void main_loop_io_worker_init(void)
Definition: mainloop-io-worker.c:142
gboolean main_loop_io_worker_job_submit(MainLoopIOWorkerJob *self, gpointer arg)
Definition: mainloop-io-worker.c:51
void main_loop_io_worker_job_init(MainLoopIOWorkerJob *self)
Definition: mainloop-io-worker.c:105
Definition: mainloop-io-worker.h:32
gpointer user_data
Definition: mainloop-io-worker.h:37
gpointer arg
Definition: mainloop-io-worker.h:38