From: Victor Julien Date: Wed, 30 Apr 2025 13:10:50 +0000 (+0200) Subject: threads: rename function to make scope more clear X-Git-Tag: suricata-8.0.0-rc1~398 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff0d609a9fb42a325e54ac63d7f962717a04db1f;p=thirdparty%2Fsuricata.git threads: rename function to make scope more clear SCTmThreadsSlotPktAcqLoopFinish ss now used outside of just pktacq as well. --- diff --git a/examples/lib/custom/main.c b/examples/lib/custom/main.c index 3237777fd7..4c8492d0b8 100644 --- a/examples/lib/custom/main.c +++ b/examples/lib/custom/main.c @@ -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(); diff --git a/src/tm-threads.c b/src/tm-threads.c index ee4a3e750f..c3998a5114 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -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); diff --git a/src/tm-threads.h b/src/tm-threads.h index 83bc826826..092a91c416 100644 --- a/src/tm-threads.h +++ b/src/tm-threads.h @@ -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. *