threadvars.h File Reference
#include "tm-queues.h"
#include "counters.h"
#include "packet-queue.h"
#include "util-atomic.h"
Include dependency graph for threadvars.h:

Go to the source code of this file.

Data Structures

struct  ThreadVars_
 Per thread variable structure. More...


#define THV_USE   BIT_U32(0) /** thread is in use */
#define THV_INIT_DONE   BIT_U32(1) /** thread initialization done */
#define THV_PAUSE   BIT_U32(2) /** signal thread to pause itself */
#define THV_PAUSED   BIT_U32(3) /** the thread is paused atm */
#define THV_KILL   BIT_U32(4) /** thread has been asked to cleanup and exit */
#define THV_FAILED   BIT_U32(5) /** thread has encountered an error and failed */
#define THV_CLOSED   BIT_U32(6) /** thread done, should be joinable */
#define THV_DEINIT   BIT_U32(7)
#define THV_KILL_PKTACQ   BIT_U32(9)
#define THV_FLOW_LOOP   BIT_U32(10)
#define THV_DEAD   BIT_U32(12)
#define THV_RUNNING   BIT_U32(13)
#define THREAD_SET_AFFINITY   0x01 /** CPU/Core affinity */
#define THREAD_SET_PRIORITY   0x02 /** Real time priority */
#define THREAD_SET_AFFTYPE   0x04 /** Priority and affinity */


typedef struct ThreadVars_ ThreadVars
 Per thread variable structure. More...

Detailed Description

Victor Julien

Definition in file threadvars.h.

Macro Definition Documentation


#define THREAD_SET_AFFINITY   0x01 /** CPU/Core affinity */

Thread setup flags:

Definition at line 141 of file threadvars.h.


#define THREAD_SET_AFFTYPE   0x04 /** Priority and affinity */

Definition at line 143 of file threadvars.h.


#define THREAD_SET_PRIORITY   0x02 /** Real time priority */

Definition at line 142 of file threadvars.h.



signal thread's capture method to create a fake packet to force through the engine. This is to force timely handling of maintenance tasks like rule reloads even if no packets are read by the capture method.

Definition at line 53 of file threadvars.h.


#define THV_CLOSED   BIT_U32(6) /** thread done, should be joinable */

Definition at line 42 of file threadvars.h.


#define THV_DEAD   BIT_U32(12)

thread has been joined with pthread_join()

Definition at line 54 of file threadvars.h.


#define THV_DEINIT   BIT_U32(7)

Definition at line 45 of file threadvars.h.


#define THV_FAILED   BIT_U32(5) /** thread has encountered an error and failed */

Definition at line 41 of file threadvars.h.


#define THV_FLOW_LOOP   BIT_U32(10)

thread is in flow shutdown loop

Definition at line 48 of file threadvars.h.


#define THV_INIT_DONE   BIT_U32(1) /** thread initialization done */

Definition at line 37 of file threadvars.h.


#define THV_KILL   BIT_U32(4) /** thread has been asked to cleanup and exit */

Definition at line 40 of file threadvars.h.


#define THV_KILL_PKTACQ   BIT_U32(9)

flag thread to stop packet acq

Definition at line 47 of file threadvars.h.


#define THV_PAUSE   BIT_U32(2) /** signal thread to pause itself */

Definition at line 38 of file threadvars.h.


#define THV_PAUSED   BIT_U32(3) /** the thread is paused atm */

Definition at line 39 of file threadvars.h.


#define THV_RUNNING   BIT_U32(13)

thread is running

Definition at line 55 of file threadvars.h.


BIT_U32(8) /** thread has completed running and is entering
* the de-init phase */

Definition at line 46 of file threadvars.h.


#define THV_USE   BIT_U32(0) /** thread is in use */

Thread flags set and read by threads to control the threads

Definition at line 36 of file threadvars.h.

Typedef Documentation

◆ ThreadVars

typedef struct ThreadVars_ ThreadVars

Per thread variable structure.

#define BIT_U32(n)
Definition: suricata-common.h:400