MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_atomic128_compare_exchange

Function mlx5_atomic128_compare_exchange

dpdk/drivers/net/mlx5/mlx5_txpp.c:489–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487
488#if defined(RTE_ARCH_X86_64)
489static inline int
490mlx5_atomic128_compare_exchange(rte_int128_t *dst,
491 rte_int128_t *exp,
492 const rte_int128_t *src)
493{
494 uint8_t res;
495
496 asm volatile (MPLOCKED
497 "cmpxchg16b %[dst];"
498 " sete %[res]"
499 : [dst] "=m" (dst->val[0]),
500 "=a" (exp->val[0]),
501 "=d" (exp->val[1]),
502 [res] "=r" (res)
503 : "b" (src->val[0]),
504 "c" (src->val[1]),
505 "a" (exp->val[0]),
506 "d" (exp->val[1]),
507 "m" (dst->val[0])
508 : "memory");
509
510 return res;
511}
512#endif
513
514static inline void

Callers 1

mlx5_atomic_read_cqeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected