* Release a pflock held for writing. * * @param pf * A pointer to a pflock structure. */
| 170 | * A pointer to a pflock structure. |
| 171 | */ |
| 172 | static inline void |
| 173 | rte_pflock_write_unlock(rte_pflock_t *pf) |
| 174 | { |
| 175 | /* Migrate from write phase to read phase. */ |
| 176 | rte_atomic_fetch_and_explicit(&pf->rd.in, RTE_PFLOCK_LSB, rte_memory_order_release); |
| 177 | |
| 178 | /* Allow other writers to continue. */ |
| 179 | rte_atomic_fetch_add_explicit(&pf->wr.out, 1, rte_memory_order_release); |
| 180 | } |
| 181 | |
| 182 | #ifdef __cplusplus |
| 183 | } |
no outgoing calls