detect-engine-loader.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DetectLoaderTask_
struct  DetectLoaderControl_


typedef int(* LoaderFunc) (void *ctx, int loader_id)
typedef struct DetectLoaderTask_ DetectLoaderTask
typedef struct DetectLoaderControl_ DetectLoaderControl


int DetectLoaderQueueTask (int loader_id, LoaderFunc Func, void *func_ctx)
int DetectLoadersSync (void)
 wait for loader tasks to complete More...
void DetectLoadersInit (void)
void TmThreadContinueDetectLoaderThreads (void)
 Unpauses all threads present in tv_root. More...
void DetectLoaderThreadSpawn (void)
 spawn the detect loader manager th
void TmModuleDetectLoaderRegister (void)

Detailed Description

Victor Julien

Detect loader API, for using multiple 'loader' threads that can load multiple detection engines in parallel.

Definition in file detect-engine-loader.h.

Typedef Documentation

◆ DetectLoaderControl

◆ DetectLoaderTask

◆ LoaderFunc

typedef int(* LoaderFunc) (void *ctx, int loader_id)
ctxfunction specific data
loader_idid of the loader that executed the task

Definition at line 34 of file detect-engine-loader.h.

Function Documentation

◆ DetectLoaderQueueTask()

int DetectLoaderQueueTask ( int  loader_id,
LoaderFunc  Func,
void *  func_ctx 
loader-1 for auto select
Return values
loader_idor negative in case of error

Definition at line 398 of file detect-engine-loader.c.

◆ DetectLoadersInit()

void DetectLoadersInit ( void  )

Definition at line 469 of file detect-engine-loader.c.

References ConfGetInt(), NLOADERS, SC_ERR_INVALID_ARGUMENTS, and SCLogError.

Here is the call graph for this function:

◆ DetectLoadersSync()

int DetectLoadersSync ( void  )

wait for loader tasks to complete

Return values
result0 for ok, -1 for errors

Definition at line 431 of file detect-engine-loader.c.

References SCLogDebug.

◆ DetectLoaderThreadSpawn()

void DetectLoaderThreadSpawn ( void  )

spawn the detect loader manager thread

Definition at line 615 of file detect-engine-loader.c.

◆ TmModuleDetectLoaderRegister()

void TmModuleDetectLoaderRegister ( void  )

◆ TmThreadContinueDetectLoaderThreads()

void TmThreadContinueDetectLoaderThreads ( void  )

Unpauses all threads present in tv_root.

Definition at line 520 of file detect-engine-loader.c.

References ThreadVars_::name, ThreadVars_::next, SCMutexLock, SCMutexUnlock, TmThreadContinue(), tv, tv_root, tv_root_lock, and TVT_MAX.

Here is the call graph for this function: