]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threading: more efficient TmSlot layout
authorVictor Julien <victor@inliniac.net>
Tue, 12 Nov 2019 13:54:33 +0000 (14:54 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 7 Feb 2020 14:43:10 +0000 (15:43 +0100)
src/tm-threads.h

index 5c4e9d64b2ef2198025aa47d9b77a04abeff434d..2e4f8a13985b10b1bb4c2e5c8b0428a021d1d79d 100644 (file)
@@ -60,12 +60,6 @@ typedef struct TmSlot_ {
      *  in a single thread. */
     struct TmSlot_ *slot_next;
 
-    TmEcode (*SlotThreadInit)(ThreadVars *, const void *, void **);
-    void (*SlotThreadExitPrintStats)(ThreadVars *, void *);
-    TmEcode (*SlotThreadDeinit)(ThreadVars *, void *);
-
-    /* data storage */
-    const void *slot_initdata;
     SC_ATOMIC_DECLARE(void *, slot_data);
 
     /* queue filled by the SlotFunc with packets that will
@@ -73,6 +67,12 @@ typedef struct TmSlot_ {
      * The locks in the queue are NOT used */
     PacketQueue slot_pre_pq;
 
+    TmEcode (*SlotThreadInit)(ThreadVars *, const void *, void **);
+    void (*SlotThreadExitPrintStats)(ThreadVars *, void *);
+    TmEcode (*SlotThreadDeinit)(ThreadVars *, void *);
+
+    /* data storage */
+    const void *slot_initdata;
     /* store the thread module id */
     int tm_id;