Sync computers
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
pub struct Volatile<T>(T);
|
||||
|
||||
impl<T> Volatile<T> {
|
||||
pub unsafe fn read(self: *const Self) -> T {
|
||||
pub unsafe fn read_volatile(self: *const Self) -> T {
|
||||
unsafe { core::ptr::read_volatile(self as *const T) }
|
||||
}
|
||||
pub unsafe fn write(self: *mut Self, value: T) {
|
||||
pub unsafe fn write_volatile(self: *mut Self, value: T) {
|
||||
unsafe { core::ptr::write_volatile(self as *mut T, value) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user