runmodes: query the active runmode with a function call

pull/13397/head
Lukas Sismis 12 months ago committed by Victor Julien
parent f0411c079d
commit 44948b9e28

@ -201,6 +201,16 @@ char *RunmodeGetActive(void)
return active_runmode;
}
bool RunmodeIsWorkers(void)
{
return RunmodeGetActive() && (strcmp(RunmodeGetActive(), "workers") == 0);
}
bool RunmodeIsAutofp(void)
{
return RunmodeGetActive() && (strcmp(RunmodeGetActive(), "autofp") == 0);
}
/**
* Return the running mode
*

@ -78,6 +78,8 @@ extern const char *thread_name_counter_wakeup;
extern const char *thread_name_heartbeat;
char *RunmodeGetActive(void);
bool RunmodeIsWorkers(void);
bool RunmodeIsAutofp(void);
const char *RunModeGetMainMode(void);
void RunModeListRunmodes(void);

Loading…
Cancel
Save