]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threading: spelling
authorVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 04:57:42 +0000 (06:57 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
src/threads-debug.h
src/threads.c
src/threadvars.h
src/tm-modules.h
src/tm-threads.c
src/tm-threads.h
src/tmqh-flow.c
src/tmqh-packetpool.c
src/tmqh-packetpool.h

index 050e305643eb8e61d85e59003f429c49b152ffef..2946d9140f26aad5bcd2b529d3f3882f7378151a 100644 (file)
@@ -32,7 +32,7 @@
 /** 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;
  * 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) ({ \
     printf("%16s(%s:%d): (thread:%"PRIuMAX") locking mutex %p\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), mut); \
 
 /** 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;
- * 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) ({ \
     printf("%16s(%s:%d): (thread:%"PRIuMAX") locking rwlock %p\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), rwl); \
index 9a08e9ddc1b193740584a39d1a16953dbf789730..1708a8f5cd3724e7e15dfc1675e20acde055363d 100644 (file)
@@ -59,7 +59,7 @@ static int ThreadMacrosTest01Mutex(void)
  * ==31156==    by 0x532E8A: UtRunTests (util-unittest.c:182)
  * ==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.
  *
  */
index 5c2efaf3b072a98fc4e705f01cd5684516e86424..ea448c0949864c0979867aa64e3790033f2b2196 100644 (file)
@@ -48,7 +48,7 @@ struct TmSlot_;
 #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
- *  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. */
 #define THV_CAPTURE_INJECT_PKT  BIT_U32(11)
 #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 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 outq_id;
 
index 7b697f2ec49af5561cea3e8b95263b1565c6ce0f..3e77db637fcf3b9c10f70a4be50d5265aef34bc2 100644 (file)
@@ -64,8 +64,8 @@ typedef struct TmModule_ {
 #ifdef UNITTESTS
     void (*RegisterTests)(void);
 #endif
-    uint8_t cap_flags;   /**< Flags to indicate the capability requierment of
-                             the given TmModule */
+    uint8_t cap_flags; /**< Flags to indicate the capability requirement of
+                           the given TmModule */
     /* Other flags used by the module */
     uint8_t flags;
 } TmModule;
index e100aaa2c17908fb04eafeeedb20b17c1f0ac30e..8f5ad969c8e1404f0fda482856b5b39b40a0510c 100644 (file)
@@ -1208,7 +1208,7 @@ static bool ThreadStillHasPackets(ThreadVars *tv)
  * \param tv A ThreadVars instance corresponding to the thread that has to be
  *           killed.
  *
- * \retval r 1 killed succesfully
+ * \retval r 1 killed successfully
  *           0 not yet ready, needs another look
  */
 static int TmThreadKillThread(ThreadVars *tv)
index 76b1ce221e7cd88c04e7388ef371b7f97dd85792..e2ca86f774d781356d74358abe40f4024c54fc45 100644 (file)
@@ -207,7 +207,7 @@ static inline TmEcode TmThreadsSlotProcessPkt(ThreadVars *tv, TmSlot *s, Packet
 /** \brief inject packet if THV_CAPTURE_INJECT_PKT is set
  *  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 */
 static inline void TmThreadsCaptureInjectPacket(ThreadVars *tv, Packet *p)
 {
index d9d09a6e49bca63b4c1ff72e88eb03f3fd2db134..4d4f8b9a8bed1f618d9a111422616f299dc16522 100644 (file)
@@ -23,7 +23,7 @@
  *
  * 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
- * 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.
  */
 
index 174bc4c38e7b2d741b6a4ea7340412aab9aafa0d..5d77e416243d254760527ea34309dffcef6fd10a 100644 (file)
@@ -478,7 +478,7 @@ void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
     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
  *  PacketPoolWaitForN call. The actual number is 9 now, so this has a
  *  bit of margin. */
@@ -487,7 +487,7 @@ void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
 /**
  *  \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
  *  worker threads.
  *
index 0cabb69dfd2a5e02779d987bc0810fca6a573b14..a48fb23b5f63fc0ecd473a679fbd4d52aafb29c9 100644 (file)
@@ -42,7 +42,7 @@ typedef struct PktPool_ {
      */
     Packet *head;
     /* 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
      * to fast insertion of the entire list onto a return stack.
      */