| 131 | |
| 132 | #ifndef atomic_fcmpset_8 |
| 133 | static __inline int |
| 134 | atomic_fcmpset_8(__volatile uint8_t *addr, uint8_t *old, uint8_t val) |
| 135 | { |
| 136 | int ret, shift; |
| 137 | uint32_t wold; |
| 138 | |
| 139 | shift = _ATOMIC_BYTE_SHIFT(addr); |
| 140 | wold = *old << shift; |
| 141 | ret = _atomic_fcmpset_masked_word(_ATOMIC_WORD_ALIGNED(addr), |
| 142 | &wold, val << shift, 0xff << shift); |
| 143 | if (ret == 0) |
| 144 | *old = (wold >> shift) & 0xff; |
| 145 | return (ret); |
| 146 | } |
| 147 | #endif |
| 148 | |
| 149 | #ifndef atomic_cmpset_16 |
no test coverage detected