From: Victor Julien Date: Tue, 12 Nov 2019 13:54:33 +0000 (+0100) Subject: threading: more efficient TmSlot layout X-Git-Tag: suricata-6.0.0-beta1~787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ed260c489155e9f9015eddce8710293ed364d14;p=thirdparty%2Fsuricata.git threading: more efficient TmSlot layout --- diff --git a/src/tm-threads.h b/src/tm-threads.h index 5c4e9d64b2..2e4f8a1398 100644 --- a/src/tm-threads.h +++ b/src/tm-threads.h @@ -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;