suricata
util-optimize.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define likely(expr)   __builtin_expect(!!(expr), 1)
 
#define unlikely(expr)   __builtin_expect(!!(expr), 0)
 
#define cc_barrier()   __asm__ __volatile__("": : :"memory")
 
#define hw_barrier()   __sync_synchronize()
 

Detailed Description

Macro Definition Documentation

◆ cc_barrier

#define cc_barrier ( )    __asm__ __volatile__("": : :"memory")

from http://en.wikipedia.org/wiki/Memory_ordering

C Compiler memory barrier

Definition at line 44 of file util-optimize.h.

◆ hw_barrier

#define hw_barrier ( )    __sync_synchronize()

from http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

Hardware memory barrier

Definition at line 50 of file util-optimize.h.

◆ likely

#define likely (   expr)    __builtin_expect(!!(expr), 1)

Definition at line 33 of file util-optimize.h.

◆ unlikely

#define unlikely (   expr)    __builtin_expect(!!(expr), 0)

Definition at line 36 of file util-optimize.h.