From ff0d609a9fb42a325e54ac63d7f962717a04db1f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 30 Apr 2025 15:10:50 +0200 Subject: [PATCH] threads: rename function to make scope more clear SCTmThreadsSlotPktAcqLoopFinish ss now used outside of just pktacq as well. --- examples/lib/custom/main.c | 4 ++-- src/tm-threads.c | 6 +++--- src/tm-threads.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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. *