| 161 | |
| 162 | #ifndef atomic_fcmpset_16 |
| 163 | static __inline int |
| 164 | atomic_fcmpset_16(__volatile uint16_t *addr, uint16_t *old, uint16_t val) |
| 165 | { |
| 166 | int ret, shift; |
| 167 | uint32_t wold; |
| 168 | |
| 169 | shift = _ATOMIC_HWORD_SHIFT(addr); |
| 170 | wold = *old << shift; |
| 171 | ret = _atomic_fcmpset_masked_word(_ATOMIC_WORD_ALIGNED(addr), |
| 172 | &wold, val << shift, 0xffff << shift); |
| 173 | if (ret == 0) |
| 174 | *old = (wold >> shift) & 0xffff; |
| 175 | return (ret); |
| 176 | } |
| 177 | #endif |
| 178 | |
| 179 | #ifndef atomic_load_acq_8 |
no test coverage detected