add initHookAtPrepare

This commit is contained in:
Michael Davidsaver
2023-09-04 09:50:08 +02:00
parent ca9c957e62
commit 9f660f2238
3 changed files with 17 additions and 0 deletions
+3
View File
@@ -139,6 +139,9 @@ const char *initHookName(int state)
"initHookBeforeFree",
"initHookAfterShutdown",
"initHookAfterPrepareDatabase",
"initHookBeforeCleanupDatabase",
"initHookAfterInterruptAccept",
"initHookAtEnd"
};
+12
View File
@@ -71,6 +71,7 @@ extern "C" {
* if the IOC is later paused and restarted.
*/
typedef enum {
// iocInit() begins
initHookAtIocBuild = 0, /**< Start of iocBuild() / iocInit() */
initHookAtBeginning, /**< Database sanity checks passed */
@@ -133,6 +134,17 @@ typedef enum {
initHookAfterShutdown,
// iocShutdown() ends
/** \brief Called during testdbPrepare()
* Use this hook to repeat actions each time an empty test database is initialized.
* \since UNRELEASED Added, triggered only by unittest code.
*/
initHookAfterPrepareDatabase,
/** \brief Called during testdbCleanup()
* Use this hook to perform cleanup each time before a test database is free()'d.
* \since UNRELEASED Added, triggered only by unittest code.
*/
initHookBeforeCleanupDatabase,
/* Deprecated states: */
/** Only announced once. Deprecated in favor of initHookAfterDatabaseRunning */
initHookAfterInterruptAccept,