]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threading: remove unused 'TmThreadRemove' function
authorVictor Julien <victor@inliniac.net>
Mon, 11 Nov 2019 19:53:03 +0000 (20:53 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 7 Feb 2020 14:43:10 +0000 (15:43 +0100)
src/tm-threads.c
src/tm-threads.h

index 878934e1c77204690ba419b894ac7d48e0c9e110..912d11014605ed7f2843683f925b6a2c98b63cd0 100644 (file)
@@ -1344,42 +1344,6 @@ void TmThreadAppend(ThreadVars *tv, int type)
     return;
 }
 
-/**
- * \brief Removes this TV from tv_root based on its type
- *
- * \param tv   The tv instance to remove from the global tv list.
- * \param type Holds the type this TV belongs to.
- */
-void TmThreadRemove(ThreadVars *tv, int type)
-{
-    SCMutexLock(&tv_root_lock);
-
-    if (tv_root[type] == NULL) {
-        SCMutexUnlock(&tv_root_lock);
-
-        return;
-    }
-
-    ThreadVars *t = tv_root[type];
-    while (t != tv) {
-        t = t->next;
-    }
-
-    if (t != NULL) {
-        if (t->prev != NULL)
-            t->prev->next = t->next;
-        if (t->next != NULL)
-            t->next->prev = t->prev;
-
-    if (t == tv_root[type])
-        tv_root[type] = t->next;;
-    }
-
-    SCMutexUnlock(&tv_root_lock);
-
-    return;
-}
-
 static bool ThreadStillHasPackets(ThreadVars *tv)
 {
     if (tv->inq != NULL && !tv->inq->is_packet_pool) {
index 6ce9c5e07be1256e4fde23eb0bbf21252a352599..1fc9469c8f48478a88efaf8a9c85bf1af6d407ae 100644 (file)
@@ -107,7 +107,6 @@ void TmThreadKillThreadsFamily(int family);
 void TmThreadKillThreads(void);
 void TmThreadClearThreadsFamily(int family);
 void TmThreadAppend(ThreadVars *, int);
-void TmThreadRemove(ThreadVars *, int);
 void TmThreadSetGroupName(ThreadVars *tv, const char *name);
 void TmThreadDumpThreads(void);