summaryrefslogtreecommitdiffstats
path: root/module-template.h
diff options
context:
space:
mode:
Diffstat (limited to 'module-template.h')
-rw-r--r--module-template.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/module-template.h b/module-template.h
index 96af4d83..ec727a45 100644
--- a/module-template.h
+++ b/module-template.h
@@ -385,6 +385,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
*pEtryPoint = modGetTermSyncType;\
} else if(!strcmp((char*) name, "willRun")) {\
*pEtryPoint = willRun;\
+ } else if(!strcmp((char*) name, "afterRun")) {\
+ *pEtryPoint = afterRun;\
}
/* modInit()
@@ -497,6 +499,25 @@ static rsRetVal willRun(void)\
}
+/* afterRun()
+ * This function is called after an input module has been run and its thread has
+ * been terminated. It shall do any necessary cleanup.
+ * This is expected to evolve into a freeInstance type of call once the input module
+ * interface evolves to support multiple instances.
+ * rgerhards, 2007-12-17
+ */
+#define BEGINafterRun \
+static rsRetVal afterRun(void)\
+{\
+ DEFiRet;
+
+#define CODESTARTafterRun
+
+#define ENDafterRun \
+ return iRet;\
+}
+
+
/* method to return which termination sync method is used by this module.
*/
#define TERM_SYNC_TYPE(x) \