FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
lock.h File Reference
+ Include dependency graph for lock.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  clib_spinlock_t
 
struct  clib_rw_lock_
 

Macros

#define CLIB_PAUSE()   __builtin_ia32_pause ()
 
#define CLIB_LOCK_DBG(_p)
 
#define CLIB_LOCK_DBG_CLEAR(_p)
 
#define CLIB_SPINLOCK_IS_LOCKED(_p)   (*(_p))->lock
 
#define CLIB_SPINLOCK_ASSERT_LOCKED(_p)   ASSERT(CLIB_SPINLOCK_IS_LOCKED((_p)))
 

Typedefs

typedef struct clib_rw_lock_clib_rwlock_t
 

Functions

static void clib_spinlock_init (clib_spinlock_t *p)
 
static void clib_spinlock_free (clib_spinlock_t *p)
 
static_always_inline void clib_spinlock_lock (clib_spinlock_t *p)
 
static_always_inline void clib_spinlock_lock_if_init (clib_spinlock_t *p)
 
static_always_inline void clib_spinlock_unlock (clib_spinlock_t *p)
 
static_always_inline void clib_spinlock_unlock_if_init (clib_spinlock_t *p)
 
static void clib_rwlock_init (clib_rwlock_t *p)
 
static void clib_rwlock_free (clib_rwlock_t *p)
 
static void clib_rwlock_reader_lock (clib_rwlock_t *p)
 
static void clib_rwlock_reader_unlock (clib_rwlock_t *p)
 
static void clib_rwlock_writer_lock (clib_rwlock_t *p)
 
static void clib_rwlock_writer_unlock (clib_rwlock_t *p)
 

Macro Definition Documentation

#define CLIB_LOCK_DBG (   _p)

Definition at line 42 of file lock.h.

#define CLIB_LOCK_DBG_CLEAR (   _p)

Definition at line 43 of file lock.h.

#define CLIB_PAUSE ( )    __builtin_ia32_pause ()

Definition at line 23 of file lock.h.

#define CLIB_SPINLOCK_ASSERT_LOCKED (   _p)    ASSERT(CLIB_SPINLOCK_IS_LOCKED((_p)))

Definition at line 47 of file lock.h.

#define CLIB_SPINLOCK_IS_LOCKED (   _p)    (*(_p))->lock

Definition at line 46 of file lock.h.

Typedef Documentation

typedef struct clib_rw_lock_ * clib_rwlock_t

Function Documentation

static void clib_rwlock_free ( clib_rwlock_t p)
inlinestatic

Definition at line 138 of file lock.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void clib_rwlock_init ( clib_rwlock_t p)
inlinestatic

Definition at line 131 of file lock.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void clib_rwlock_reader_lock ( clib_rwlock_t p)
inlinestatic

Definition at line 148 of file lock.h.

+ Here is the caller graph for this function:

static void clib_rwlock_reader_unlock ( clib_rwlock_t p)
inlinestatic

Definition at line 163 of file lock.h.

+ Here is the caller graph for this function:

static void clib_rwlock_writer_lock ( clib_rwlock_t p)
inlinestatic

Definition at line 171 of file lock.h.

+ Here is the caller graph for this function:

static void clib_rwlock_writer_unlock ( clib_rwlock_t p)
inlinestatic

Definition at line 185 of file lock.h.

+ Here is the caller graph for this function:

static void clib_spinlock_free ( clib_spinlock_t p)
inlinestatic

Definition at line 68 of file lock.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void clib_spinlock_init ( clib_spinlock_t p)
inlinestatic

Definition at line 61 of file lock.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void clib_spinlock_lock ( clib_spinlock_t p)

Definition at line 78 of file lock.h.

+ Here is the caller graph for this function:

static_always_inline void clib_spinlock_lock_if_init ( clib_spinlock_t p)

Definition at line 93 of file lock.h.

+ Here is the call graph for this function:

static_always_inline void clib_spinlock_unlock ( clib_spinlock_t p)

Definition at line 100 of file lock.h.

+ Here is the caller graph for this function:

static_always_inline void clib_spinlock_unlock_if_init ( clib_spinlock_t p)

Definition at line 108 of file lock.h.

+ Here is the call graph for this function: