From: Victor Julien Date: Thu, 14 May 2015 08:17:16 +0000 (+0200) Subject: threading: remove unused cmd thread create func X-Git-Tag: suricata-3.0RC1~420 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c96805e83955b3ef878adbae8564da8d096ff0b4;p=thirdparty%2Fsuricata.git threading: remove unused cmd thread create func --- diff --git a/src/tm-threads.c b/src/tm-threads.c index b77f52af4d..171aca2e48 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -1262,34 +1262,6 @@ ThreadVars *TmThreadCreateCmdThreadByName(char *name, char *module, return tv; } -/** - * \brief Creates and returns the TV instance for a CMD thread. - * This function supports only custom slot functions and hence a - * function pointer should be sent as an argument. - * - * \param name Name of this TV instance - * \param fn_p Pointer to function when \"slots\" is of type \"custom\" - * \param mucond Flag to indicate whether to initialize the condition - * and the mutex variables for this newly created TV. - * - * \retval the newly created TV instance, or NULL on error - */ -ThreadVars *TmThreadCreateCmdThread(char *name, void *(fn_p)(void *), - int mucond) -{ - ThreadVars *tv = NULL; - - tv = TmThreadCreate(name, NULL, NULL, NULL, NULL, "custom", fn_p, mucond); - - if (tv != NULL) { - tv->type = TVT_CMD; - tv->id = TmThreadsRegisterThread(tv, tv->type); - TmThreadSetCPU(tv, MANAGEMENT_CPU_SET); - } - - return tv; -} - /** * \brief Appends this TV to tv_root based on its type * diff --git a/src/tm-threads.h b/src/tm-threads.h index 363a30b8b3..9b9fd620df 100644 --- a/src/tm-threads.h +++ b/src/tm-threads.h @@ -91,7 +91,6 @@ ThreadVars *TmThreadCreatePacketHandler(char *, char *, char *, char *, char *, ThreadVars *TmThreadCreateMgmtThread(char *name, void *(fn_p)(void *), int); ThreadVars *TmThreadCreateMgmtThreadByName(char *name, char *module, int mucond); -ThreadVars *TmThreadCreateCmdThread(char *name, void *(fn_p)(void *), int); ThreadVars *TmThreadCreateCmdThreadByName(char *name, char *module, int mucond); TmEcode TmThreadSpawn(ThreadVars *);