Write a u16 value into a CACHE code unit at `index`. Each CodeUnit is 2 bytes (#[repr(C)]: op u8 + arg u8), so one u16 fits exactly. Uses Relaxed atomic store; ordering is provided by replace_op (Release). # Safety - `index` must be in bounds and point to a CACHE entry.
(&self, index: usize, value: u16)
| 704 | /// # Safety |
| 705 | /// - `index` must be in bounds and point to a CACHE entry. |
| 706 | pub unsafe fn write_cache_u16(&self, index: usize, value: u16) { |
| 707 | let units = unsafe { &*self.units.get() }; |
| 708 | let ptr = units.as_ptr().wrapping_add(index) as *const AtomicU16; |
| 709 | unsafe { &*ptr }.store(value, Ordering::Relaxed); |
| 710 | } |
| 711 | |
| 712 | /// Read a u16 value from a CACHE code unit at `index`. |
| 713 | /// Uses Relaxed atomic load; ordering is provided by read_op (Acquire). |
no test coverage detected