| 792 | } |
| 793 | |
| 794 | static __inline uint32_t |
| 795 | atomic_swap_32(volatile uint32_t *ptr, const uint32_t value) |
| 796 | { |
| 797 | uint32_t retval; |
| 798 | |
| 799 | retval = *ptr; |
| 800 | |
| 801 | while (!atomic_fcmpset_32(ptr, &retval, value)) |
| 802 | ; |
| 803 | return (retval); |
| 804 | } |
| 805 | |
| 806 | #if defined(__mips_n64) || defined(__mips_n32) |
| 807 | static __inline uint64_t |
no test coverage detected