summaryrefslogtreecommitdiffstats
path: root/module-template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-14 16:51:34 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-14 16:51:34 +0000
commit6c0c26dc96544aa5814d00045b3d559c99fc1b2e (patch)
tree20d558391ba1d881ab3b27f7fbcc636dcfbc67ad /module-template.h
parent6a80d9ee504b57e2b815c91698785d4fcd06f62e (diff)
downloadrsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.tar.gz
rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.tar.xz
rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.zip
on the way to a real input module interface and threading class...
Diffstat (limited to 'module-template.h')
-rw-r--r--module-template.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/module-template.h b/module-template.h
index d54f5f83..4bce7f8d 100644
--- a/module-template.h
+++ b/module-template.h
@@ -28,6 +28,7 @@
#include "modules.h"
#include "objomsr.h"
+#include "threads.h"
/* macro to define standard output-module static data members
*/
@@ -445,6 +446,24 @@ static rsRetVal modExit(void)\
return iRet;\
}
+
+/* runInput()
+ * This is the main function for input modules. It is used to gather data from the
+ * input source and submit it to the message queue. Each runInput() instance has its own
+ * thread. This is handled by the rsyslog engine. It needs to spawn off new threads only
+ * if there is a module-internal need to do so.
+ */
+#define BEGINrunInput \
+static rsRetVal runInput(void)\
+{\
+ DEFiRet;
+
+#define CODESTARTrunInput
+
+#define ENDrunInput \
+ return iRet;\
+}
+
/*
* vi:set ai:
*/