| rte_mcslock.h(3) | Library Functions Manual | rte_mcslock.h(3) |
rte_mcslock.h
#include <rte_lcore.h>
#include <rte_common.h>
#include <rte_pause.h>
#include <rte_branch_prediction.h>
#include <rte_stdatomic.h>
struct rte_mcslock
typedef struct rte_mcslock rte_mcslock_t
static void rte_mcslock_lock (1(rte_mcslock_t *)
*msl, rte_mcslock_t *me)
static void rte_mcslock_unlock (1(rte_mcslock_t *) *msl,
1(rte_mcslock_t *) me)
static int rte_mcslock_trylock (1(rte_mcslock_t *) *msl,
rte_mcslock_t *me)
static int rte_mcslock_is_locked (1(rte_mcslock_t *) msl)
RTE MCS lock
This file defines the main data structure and APIs for MCS queued lock.
The MCS lock (proposed by John M. Mellor-Crummey and Michael L. Scott) provides scalability by spinning on a CPU/thread local variable which avoids expensive cache bouncings. It provides fairness by maintaining a list of acquirers and passing the lock to each CPU/thread in the order they acquired the lock.
Definition in file rte_mcslock.h.
The rte_mcslock_t type.
Take the MCS lock.
Parameters
Definition at line 52 of file rte_mcslock.h.
Release the MCS lock.
Parameters
Definition at line 104 of file rte_mcslock.h.
Try to take the lock.
Parameters
Returns
Definition at line 144 of file rte_mcslock.h.
Test if the lock is taken.
Parameters
Returns
Definition at line 171 of file rte_mcslock.h.
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |