| 253 | * 1 if the write lock is currently taken; 0 otherwise. |
| 254 | */ |
| 255 | static inline int |
| 256 | rte_rwlock_write_is_locked(rte_rwlock_t *rwl) |
| 257 | { |
| 258 | if (rte_atomic_load_explicit(&rwl->cnt, rte_memory_order_relaxed) & RTE_RWLOCK_WRITE) |
| 259 | return 1; |
| 260 | |
| 261 | return 0; |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Try to execute critical section in a hardware memory transaction, if it |