| 614 | } |
| 615 | |
| 616 | static __inline uint64_t |
| 617 | atomic_fetchadd_64(volatile uint64_t *p, uint64_t v) |
| 618 | { |
| 619 | |
| 620 | for (;;) { |
| 621 | uint64_t t = *p; |
| 622 | if (atomic_cmpset_64(p, t, t + v)) |
| 623 | return (t); |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | static __inline void |
| 628 | atomic_add_64(volatile uint64_t *p, uint64_t v) |
no test coverage detected