summaryrefslogtreecommitdiffstats
path: root/module-template.h
diff options
context:
space:
mode:
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:
*/