threads: rename function to make scope more clear

SCTmThreadsSlotPktAcqLoopFinish ss now used outside of
just pktacq as well.
pull/13125/head
Victor Julien 1 year ago committed by Victor Julien
parent 12f8f03532
commit ff0d609a9f

@ -138,7 +138,7 @@ done:
* Note that there is some thread synchronization between this * Note that there is some thread synchronization between this
* function and SuricataShutdown such that they must be run * function and SuricataShutdown such that they must be run
* concurrently at this time before either will exit. */ * concurrently at this time before either will exit. */
SCTmThreadsSlotPktAcqLoopFinish(tv); SCTmThreadsSlotPacketLoopFinish(tv);
SCLogNotice("Worker thread exiting"); SCLogNotice("Worker thread exiting");
pthread_exit(NULL); pthread_exit(NULL);
@ -234,7 +234,7 @@ int main(int argc, char **argv)
SCLogNotice("Shutting down"); SCLogNotice("Shutting down");
/* Note that there is some thread synchronization between this /* 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. */ * to be run concurrently at this time. */
SuricataShutdown(); SuricataShutdown();
GlobalsDestroy(); GlobalsDestroy();

@ -270,7 +270,7 @@ error:
return false; return false;
} }
bool SCTmThreadsSlotPktAcqLoopFinish(ThreadVars *tv) bool SCTmThreadsSlotPacketLoopFinish(ThreadVars *tv)
{ {
TmSlot *s = tv->tm_slots; TmSlot *s = tv->tm_slots;
bool rc = true; bool rc = true;
@ -344,7 +344,7 @@ static void *TmThreadsSlotPktAcqLoop(void *td)
run = false; run = false;
} }
} }
if (!SCTmThreadsSlotPktAcqLoopFinish(tv)) { if (!SCTmThreadsSlotPacketLoopFinish(tv)) {
goto error; goto error;
} }
@ -521,7 +521,7 @@ static void *TmThreadsSlotVar(void *td)
run = false; run = false;
} }
} }
if (!SCTmThreadsSlotPktAcqLoopFinish(tv)) { if (!SCTmThreadsSlotPacketLoopFinish(tv)) {
goto error; goto error;
} }
StatsSyncCounters(tv); StatsSyncCounters(tv);

@ -291,7 +291,7 @@ void TmThreadsGetMinimalTimestamp(struct timeval *ts);
SCTime_t TmThreadsGetThreadTime(const int idx); SCTime_t TmThreadsGetThreadTime(const int idx);
uint16_t TmThreadsGetWorkerThreadMax(void); uint16_t TmThreadsGetWorkerThreadMax(void);
bool TmThreadsTimeSubsysIsReady(void); bool TmThreadsTimeSubsysIsReady(void);
bool SCTmThreadsSlotPktAcqLoopFinish(ThreadVars *tv); bool SCTmThreadsSlotPacketLoopFinish(ThreadVars *tv);
/** \brief Wait for a thread to become unpaused. /** \brief Wait for a thread to become unpaused.
* *

Loading…
Cancel
Save