staticvoidrte_rwlock_init(rte_rwlock_t*rwl)[inline],[static]
Initialize the rwlock to an unlocked state.
Parametersrwl A pointer to the rwlock structure.
Definition at line 76 of file rte_rwlock.h.
staticvoidrte_rwlock_read_lock(rte_rwlock_t*rwl)[inline],[static]
Take a read lock. Loop until the lock is held.
Note
The RW lock isn't recursive, so calling this function on the same lock twice without releasing it
could potentially result in a deadlock scenario when a write lock is involved.
Parametersrwl A pointer to a rwlock structure.
Definition at line 92 of file rte_rwlock.h.
staticintrte_rwlock_read_trylock(rte_rwlock_t*rwl)[inline],[static]
Try to take a read lock.
Parametersrwl A pointer to a rwlock structure.
Returns
• zero if the lock is successfully taken
• -EBUSY if lock could not be acquired for reading because a writer holds the lock
Definition at line 129 of file rte_rwlock.h.
staticvoidrte_rwlock_read_unlock(rte_rwlock_t*rwl)[inline],[static]
Release a read lock.
Parametersrwl A pointer to the rwlock structure.
Definition at line 162 of file rte_rwlock.h.
staticintrte_rwlock_write_trylock(rte_rwlock_t*rwl)[inline],[static]
Try to take a write lock.
Parametersrwl A pointer to a rwlock structure.
Returns
• zero if the lock is successfully taken
• -EBUSY if lock could not be acquired for writing because it was already locked for reading or
writing
Definition at line 180 of file rte_rwlock.h.
staticvoidrte_rwlock_write_lock(rte_rwlock_t*rwl)[inline],[static]
Take a write lock. Loop until the lock is held.
Parametersrwl A pointer to a rwlock structure.
Definition at line 202 of file rte_rwlock.h.
staticvoidrte_rwlock_write_unlock(rte_rwlock_t*rwl)[inline],[static]
Release a write lock.
Parametersrwl A pointer to a rwlock structure.
Definition at line 240 of file rte_rwlock.h.
staticintrte_rwlock_write_is_locked(rte_rwlock_t*rwl)[inline],[static]
Test if the write lock is taken.
Parametersrwl A pointer to a rwlock structure.
Returns
1 if the write lock is currently taken; 0 otherwise.
Definition at line 256 of file rte_rwlock.h.
staticvoidrte_rwlock_read_lock_tm(rte_rwlock_t*rwl)[inline],[static]
Try to execute critical section in a hardware memory transaction, if it fails or not available take a
read lock
NOTE: An attempt to perform a HW I/O operation inside a hardware memory transaction always aborts the
transaction since the CPU is not able to roll-back should the transaction fail. Therefore, hardware
transactional locks are not advised to be used around rte_eth_rx_burst() and rte_eth_tx_burst() calls.
Parametersrwl A pointer to a rwlock structure.
staticvoidrte_rwlock_read_unlock_tm(rte_rwlock_t*rwl)[inline],[static]
Commit hardware memory transaction or release the read lock if the lock is used as a fall-back
Parametersrwl A pointer to the rwlock structure.
staticvoidrte_rwlock_write_lock_tm(rte_rwlock_t*rwl)[inline],[static]
Try to execute critical section in a hardware memory transaction, if it fails or not available take a
write lock
NOTE: An attempt to perform a HW I/O operation inside a hardware memory transaction always aborts the
transaction since the CPU is not able to roll-back should the transaction fail. Therefore, hardware
transactional locks are not advised to be used around rte_eth_rx_burst() and rte_eth_tx_burst() calls.
Parametersrwl A pointer to a rwlock structure.
staticvoidrte_rwlock_write_unlock_tm(rte_rwlock_t*rwl)[inline],[static]
Commit hardware memory transaction or release the write lock if the lock is used as a fall-back
Parametersrwl A pointer to a rwlock structure.