threading: spelling

pull/8828/head
Victor Julien 2 years ago
parent 8d381fa7dd
commit 52be5b242c

@ -32,7 +32,7 @@
/** When dbg threads is defined, if a mutex fail to lock, it's /** When dbg threads is defined, if a mutex fail to lock, it's
* initialized, logged, and does a second try; This is to prevent the system to freeze; * initialized, logged, and does a second try; This is to prevent the system to freeze;
* It is for Mac OS X users; * It is for Mac OS X users;
* If you see a mutex, spinlock or condiion not initialized, report it please! * If you see a mutex, spinlock or condition not initialized, report it please!
*/ */
#define SCMutexLock_dbg(mut) ({ \ #define SCMutexLock_dbg(mut) ({ \
printf("%16s(%s:%d): (thread:%"PRIuMAX") locking mutex %p\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), mut); \ printf("%16s(%s:%d): (thread:%"PRIuMAX") locking mutex %p\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), mut); \
@ -242,7 +242,7 @@
/** When dbg threads is defined, if a rwlock fail to lock, it's /** When dbg threads is defined, if a rwlock fail to lock, it's
* initialized, logged, and does a second try; This is to prevent the system to freeze; * initialized, logged, and does a second try; This is to prevent the system to freeze;
* If you see a rwlock, spinlock or condiion not initialized, report it please! * If you see a rwlock, spinlock or condition not initialized, report it please!
*/ */
#define SCRWLockRDLock_dbg(rwl) ({ \ #define SCRWLockRDLock_dbg(rwl) ({ \
printf("%16s(%s:%d): (thread:%"PRIuMAX") locking rwlock %p\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), rwl); \ printf("%16s(%s:%d): (thread:%"PRIuMAX") locking rwlock %p\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), rwl); \

@ -59,7 +59,7 @@ static int ThreadMacrosTest01Mutex(void)
* ==31156== by 0x532E8A: UtRunTests (util-unittest.c:182) * ==31156== by 0x532E8A: UtRunTests (util-unittest.c:182)
* ==31156== by 0x4065C3: main (suricata.c:789) * ==31156== by 0x4065C3: main (suricata.c:789)
* *
* To me this is a false positve, as the whole point of "trylock" is to see * To me this is a false positive, as the whole point of "trylock" is to see
* if a spinlock is actually locked. * if a spinlock is actually locked.
* *
*/ */

@ -48,7 +48,7 @@ struct TmSlot_;
#define THV_FLOW_LOOP BIT_U32(10) /**< thread is in flow shutdown loop */ #define THV_FLOW_LOOP BIT_U32(10) /**< thread is in flow shutdown loop */
/** signal thread's capture method to create a fake packet to force through /** signal thread's capture method to create a fake packet to force through
* the engine. This is to force timely handling of maintenance taks like * the engine. This is to force timely handling of maintenance tasks like
* rule reloads even if no packets are read by the capture method. */ * rule reloads even if no packets are read by the capture method. */
#define THV_CAPTURE_INJECT_PKT BIT_U32(11) #define THV_CAPTURE_INJECT_PKT BIT_U32(11)
#define THV_DEAD BIT_U32(12) /**< thread has been joined with pthread_join() */ #define THV_DEAD BIT_U32(12) /**< thread has been joined with pthread_join() */
@ -79,7 +79,7 @@ typedef struct ThreadVars_ {
uint8_t tmm_flags; uint8_t tmm_flags;
uint8_t cap_flags; /**< Flags to indicate the capabilities of all the uint8_t cap_flags; /**< Flags to indicate the capabilities of all the
TmModules resgitered under this thread */ TmModules registered under this thread */
uint8_t inq_id; uint8_t inq_id;
uint8_t outq_id; uint8_t outq_id;

@ -64,8 +64,8 @@ typedef struct TmModule_ {
#ifdef UNITTESTS #ifdef UNITTESTS
void (*RegisterTests)(void); void (*RegisterTests)(void);
#endif #endif
uint8_t cap_flags; /**< Flags to indicate the capability requierment of uint8_t cap_flags; /**< Flags to indicate the capability requirement of
the given TmModule */ the given TmModule */
/* Other flags used by the module */ /* Other flags used by the module */
uint8_t flags; uint8_t flags;
} TmModule; } TmModule;

@ -1208,7 +1208,7 @@ static bool ThreadStillHasPackets(ThreadVars *tv)
* \param tv A ThreadVars instance corresponding to the thread that has to be * \param tv A ThreadVars instance corresponding to the thread that has to be
* killed. * killed.
* *
* \retval r 1 killed succesfully * \retval r 1 killed successfully
* 0 not yet ready, needs another look * 0 not yet ready, needs another look
*/ */
static int TmThreadKillThread(ThreadVars *tv) static int TmThreadKillThread(ThreadVars *tv)

@ -207,7 +207,7 @@ static inline TmEcode TmThreadsSlotProcessPkt(ThreadVars *tv, TmSlot *s, Packet
/** \brief inject packet if THV_CAPTURE_INJECT_PKT is set /** \brief inject packet if THV_CAPTURE_INJECT_PKT is set
* Allow caller to supply their own packet * Allow caller to supply their own packet
* *
* Meant for detect reload process that interupts an sleeping capture thread * Meant for detect reload process that interrupts an sleeping capture thread
* to force a packet through the engine to complete a reload */ * to force a packet through the engine to complete a reload */
static inline void TmThreadsCaptureInjectPacket(ThreadVars *tv, Packet *p) static inline void TmThreadsCaptureInjectPacket(ThreadVars *tv, Packet *p)
{ {

@ -23,7 +23,7 @@
* *
* Simple output queue handler that makes sure all packets of the same flow * Simple output queue handler that makes sure all packets of the same flow
* are sent to the same queue. We support different kind of q handlers. Have * are sent to the same queue. We support different kind of q handlers. Have
* a look at "autofp-scheduler" conf to further undertsand the various q * a look at "autofp-scheduler" conf to further understand the various q
* handlers we provide. * handlers we provide.
*/ */

@ -478,7 +478,7 @@ void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
return; return;
} }
/** number of packets to keep reserved when calculating the the pending /** number of packets to keep reserved when calculating the pending
* return packets count. This assumes we need at max 10 packets in one * return packets count. This assumes we need at max 10 packets in one
* PacketPoolWaitForN call. The actual number is 9 now, so this has a * PacketPoolWaitForN call. The actual number is 9 now, so this has a
* bit of margin. */ * bit of margin. */
@ -487,7 +487,7 @@ void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
/** /**
* \brief Set the max_pending_return_packets value * \brief Set the max_pending_return_packets value
* *
* Set it to the max pending packets value, devided by the number * Set it to the max pending packets value, divided by the number
* of lister threads. Normally, in autofp these are the stream/detect/log * of lister threads. Normally, in autofp these are the stream/detect/log
* worker threads. * worker threads.
* *

@ -42,7 +42,7 @@ typedef struct PktPool_ {
*/ */
Packet *head; Packet *head;
/* Packets waiting (pending) to be returned to the given Packet /* Packets waiting (pending) to be returned to the given Packet
* Pool. Accumulate packets for the same pool until a theshold is * Pool. Accumulate packets for the same pool until a threshold is
* reached, then return them all at once. Keep the head and tail * reached, then return them all at once. Keep the head and tail
* to fast insertion of the entire list onto a return stack. * to fast insertion of the entire list onto a return stack.
*/ */

Loading…
Cancel
Save