Searched refs:from_ptr (Results 1 – 8 of 8) sorted by relevance
149 let mut reader = UserSlice::new(UserPtr::from_ptr(buf as *mut c_void), count).reader();272 let mut writer = UserSlice::new(UserPtr::from_ptr(buf.cast()), count).writer(); in blob_read() 326 let mut reader = UserSlice::new(UserPtr::from_ptr(buf.cast_mut().cast()), count).reader(); in blob_write()
36 pub unsafe fn from_ptr<'a>(ptr: *const bindings::pid_namespace) -> &'a Self { in from_ptr() method
333 Some(unsafe { PidNamespace::from_ptr(active_ns) }) in active_pid_ns()
204 pub const unsafe fn from_ptr(ptr: *mut bindings::module) -> ThisModule { in from_ptr() 203 pub const unsafe fn from_ptr(ptr: *mut bindings::module) -> ThisModule { from_ptr() method
36 pub fn from_ptr(addr: *mut c_void) -> Self { in from_ptr() method
225 // This function exists to paper over the fact that `CStr::from_ptr` takes a `*const338 // SAFETY: The safety preconditions are the same as for `CStr::from_ptr`.339 unsafe { CStr::from_ptr(ptr.cast()) }
330 unsafe { Credential::from_ptr(ptr) } in cred()
39 /// [`LKMM`][LKMM] atomic primitives. With the help of [`Atomic::from_ptr()`] and179 /// Using [`Atomic::from_ptr()`] combined with [`Atomic::load()`] or [`Atomic::store()`] can208 /// let a = unsafe { Atomic::from_ptr(foo_a_ptr) }.load(Relaxed); in from_ptr() 215 /// unsafe { Atomic::from_ptr(foo_a_ptr) }.store(2, Release); in from_ptr() 217 pub unsafe fn from_ptr<'a>(ptr: *mut T) -> &'a Self {750 /// This function provides a short-cut of `Atomic::from_ptr().load(..)`, and can be used to work772 unsafe { Atomic::from_ptr(ptr) }.load(o)777 /// This function provides a short-cut of `Atomic::from_ptr().load(..)`, and can be used to work799 unsafe { Atomic::from_ptr(ptr) }.store(v, o);804 /// This function provides a short-cut of `Atomic::from_ptr()207 pub unsafe fn from_ptr<'a>(ptr: *mut T) -> &'a Self from_ptr() method [all...]