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 43 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 49 of file util-optimize.h.

◆ likely

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

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

◆ unlikely

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

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