Atomically read the arg byte at `index` with Relaxed ordering.
(&self, index: usize)
| 691 | |
| 692 | /// Atomically read the arg byte at `index` with Relaxed ordering. |
| 693 | pub fn read_arg(&self, index: usize) -> OpArgByte { |
| 694 | let units = unsafe { &*self.units.get() }; |
| 695 | let ptr = units.as_ptr().wrapping_add(index) as *const u8; |
| 696 | let arg_ptr = unsafe { ptr.add(1) } as *const AtomicU8; |
| 697 | OpArgByte::from(unsafe { &*arg_ptr }.load(Ordering::Relaxed)) |
| 698 | } |
| 699 | |
| 700 | /// Write a u16 value into a CACHE code unit at `index`. |
| 701 | /// Each CodeUnit is 2 bytes (#[repr(C)]: op u8 + arg u8), so one u16 fits exactly. |