Lines Matching defs:XArray
3 //! XArray abstraction.
30 /// use kernel::xarray::{AllocKind, XArray};
32 /// let xa = KBox::pin_init(XArray::new(AllocKind::Alloc1), GFP_KERNEL)?;
56 pub struct XArray<T: ForeignOwnable> {
63 impl<T: ForeignOwnable> PinnedDrop for XArray<T> {
79 /// Flags passed to [`XArray::new`] to configure the array's allocation tracking behavior.
87 impl<T: ForeignOwnable> XArray<T> {
121 /// Attempts to lock the [`XArray`] for exclusive access.
134 /// Locks the [`XArray`] for exclusive access.
151 xa: &'a XArray<T>,
236 "pointers stored in XArray must be 4-byte aligned"
265 // NB: `XA_ZERO_ENTRY` is never returned by functions belonging to the Normal XArray
272 // SAFETY: `XArray<T>` has no shared mutable state so it is `Send` iff `T` is `Send`.
273 unsafe impl<T: ForeignOwnable + Send> Send for XArray<T> {}
275 // SAFETY: `XArray<T>` serialises the interior mutability it provides so it is `Sync` iff `T` is
277 unsafe impl<T: ForeignOwnable + Send> Sync for XArray<T> {}