]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threads: rename function to make scope more clear
authorVictor Julien <vjulien@oisf.net>
Wed, 30 Apr 2025 13:10:50 +0000 (15:10 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 30 Apr 2025 20:22:23 +0000 (22:22 +0200)
SCTmThreadsSlotPktAcqLoopFinish ss now used outside of
just pktacq as well.

examples/lib/custom/main.c
src/tm-threads.c
src/tm-threads.h

index 3237777fd78f3d08ecc4bbaa92c497c51d0df0bb..4c8492d0b87ad8ac92f4390434b2b98094a24dff 100644 (file)
@@ -138,7 +138,7 @@ done:
      * Note that there is some thread synchronization between this
      * function and SuricataShutdown such that they must be run
      * concurrently at this time before either will exit. */
-    SCTmThreadsSlotPktAcqLoopFinish(tv);
+    SCTmThreadsSlotPacketLoopFinish(tv);
 
     SCLogNotice("Worker thread exiting");
     pthread_exit(NULL);
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
     SCLogNotice("Shutting down");
 
     /* Note that there is some thread synchronization between this
-     * function and SCTmThreadsSlotPktAcqLoopFinish that require them
+     * function and SCTmThreadsSlotPacketLoopFinish that require them
      * to be run concurrently at this time. */
     SuricataShutdown();
     GlobalsDestroy();
index ee4a3e750f3e254c3d9a8d65f7745e7a20131573..c3998a5114fa72ffb6b0d19e5a43f4f6081f7778 100644 (file)
@@ -270,7 +270,7 @@ error:
     return false;
 }
 
-bool SCTmThreadsSlotPktAcqLoopFinish(ThreadVars *tv)
+bool SCTmThreadsSlotPacketLoopFinish(ThreadVars *tv)
 {
     TmSlot *s = tv->tm_slots;
     bool rc = true;
@@ -344,7 +344,7 @@ static void *TmThreadsSlotPktAcqLoop(void *td)
             run = false;
         }
     }
-    if (!SCTmThreadsSlotPktAcqLoopFinish(tv)) {
+    if (!SCTmThreadsSlotPacketLoopFinish(tv)) {
         goto error;
     }
 
@@ -521,7 +521,7 @@ static void *TmThreadsSlotVar(void *td)
             run = false;
         }
     }
-    if (!SCTmThreadsSlotPktAcqLoopFinish(tv)) {
+    if (!SCTmThreadsSlotPacketLoopFinish(tv)) {
         goto error;
     }
     StatsSyncCounters(tv);
index 83bc826826081aa857994993650be8b1bc3cafe1..092a91c4166eb9a8e2c47d061519cfb721f26814 100644 (file)
@@ -291,7 +291,7 @@ void TmThreadsGetMinimalTimestamp(struct timeval *ts);
 SCTime_t TmThreadsGetThreadTime(const int idx);
 uint16_t TmThreadsGetWorkerThreadMax(void);
 bool TmThreadsTimeSubsysIsReady(void);
-bool SCTmThreadsSlotPktAcqLoopFinish(ThreadVars *tv);
+bool SCTmThreadsSlotPacketLoopFinish(ThreadVars *tv);
 
 /** \brief Wait for a thread to become unpaused.
  *