DPDK
19.08.0-rc0
|
Go to the source code of this file.
Data Structures | |
union | rte_ticketlock_t |
Macros | |
#define | RTE_TICKETLOCK_INITIALIZER { 0 } |
#define | TICKET_LOCK_INVALID_ID -1 |
#define | RTE_TICKETLOCK_RECURSIVE_INITIALIZER |
Functions | |
static __rte_experimental void | rte_ticketlock_init (rte_ticketlock_t *tl) |
static __rte_experimental void | rte_ticketlock_lock (rte_ticketlock_t *tl) |
static __rte_experimental void | rte_ticketlock_unlock (rte_ticketlock_t *tl) |
static __rte_experimental int | rte_ticketlock_trylock (rte_ticketlock_t *tl) |
static __rte_experimental int | rte_ticketlock_is_locked (rte_ticketlock_t *tl) |
static __rte_experimental void | rte_ticketlock_recursive_init (rte_ticketlock_recursive_t *tlr) |
static __rte_experimental void | rte_ticketlock_recursive_lock (rte_ticketlock_recursive_t *tlr) |
static __rte_experimental void | rte_ticketlock_recursive_unlock (rte_ticketlock_recursive_t *tlr) |
static __rte_experimental int | rte_ticketlock_recursive_trylock (rte_ticketlock_recursive_t *tlr) |
RTE ticket locks
This file defines an API for ticket locks, which give each waiting thread a ticket and take the lock one by one, first come, first serviced.
All locks must be initialised before use, and only initialised once.
Definition in file rte_ticketlock.h.
#define RTE_TICKETLOCK_INITIALIZER { 0 } |
A static ticketlock initializer.
Definition at line 43 of file rte_ticketlock.h.
#define TICKET_LOCK_INVALID_ID -1 |
The rte_ticketlock_recursive_t type.
Definition at line 127 of file rte_ticketlock.h.
#define RTE_TICKETLOCK_RECURSIVE_INITIALIZER |
A static recursive ticketlock initializer.
Definition at line 138 of file rte_ticketlock.h.
|
inlinestatic |
Initialize the ticketlock to an unlocked state.
tl | A pointer to the ticketlock. |
Definition at line 52 of file rte_ticketlock.h.
|
inlinestatic |
Take the ticketlock.
tl | A pointer to the ticketlock. |
Definition at line 64 of file rte_ticketlock.h.
|
inlinestatic |
Release the ticketlock.
tl | A pointer to the ticketlock. |
Definition at line 78 of file rte_ticketlock.h.
|
inlinestatic |
Try to take the lock.
tl | A pointer to the ticketlock. |
Definition at line 93 of file rte_ticketlock.h.
|
inlinestatic |
Test if the lock is taken.
tl | A pointer to the ticketlock. |
Definition at line 117 of file rte_ticketlock.h.
|
inlinestatic |
Initialize the recursive ticketlock to an unlocked state.
tlr | A pointer to the recursive ticketlock. |
Definition at line 148 of file rte_ticketlock.h.
|
inlinestatic |
Take the recursive ticketlock.
tlr | A pointer to the recursive ticketlock. |
Definition at line 162 of file rte_ticketlock.h.
|
inlinestatic |
Release the recursive ticketlock.
tlr | A pointer to the recursive ticketlock. |
Definition at line 180 of file rte_ticketlock.h.
|
inlinestatic |
Try to take the recursive lock.
tlr | A pointer to the recursive ticketlock. |
Definition at line 198 of file rte_ticketlock.h.