Lines Matching full:safety

44         // SAFETY: All GEM objects are refcounted.
51 // SAFETY: The existence of a shared reference guarantees that the refcount is
57 // SAFETY: `obj` is a valid pointer to an `Object<T>`.
60 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
108 /// # Safety
120 // SAFETY: `open_callback` is only ever called with a valid pointer to a `struct drm_file`.
123 // SAFETY: `open_callback` is specified in the AllocOps structure for `DriverObject<T>`,
137 // SAFETY: `open_callback` is only ever called with a valid pointer to a `struct drm_file`.
140 // SAFETY: `close_callback` is specified in the AllocOps structure for `Object<T>`, ensuring
153 // SAFETY: `obj` is guaranteed to be in an `Object<T>` via the safety contract of this
163 // SAFETY: `self.as_raw()` is guaranteed to be a pointer to a valid `struct drm_gem_object`.
176 // SAFETY: The arguments are all valid per the type invariants.
190 // SAFETY: The arguments are all valid per the type invariants.
196 // SAFETY:
204 // SAFETY:
213 // SAFETY: The arguments are valid per the type invariant.
216 // SAFETY: The arguments are valid per the type invariant.
228 // SAFETY: `self.as_raw()` always returns a valid pointer to the base DRM GEM object.
277 // SAFETY: `obj.as_raw()` is guaranteed to be valid by the initialization above.
280 // SAFETY: The arguments are all valid per the type invariants.
283 // SAFETY: We will never move out of `Self` as `ARef<Self>` is always treated as pinned.
286 // SAFETY: `ptr` comes from `KBox::into_raw` and hence can't be NULL.
289 // SAFETY: We take over the initial reference count from `drm_gem_object_init()`.
295 // SAFETY:
311 // SAFETY: All of our objects are of type `Object<T>`.
314 // SAFETY: The C code only ever calls this callback with a valid pointer to a `struct
318 // SAFETY: All of our objects are allocated via `KBox`, and we're in the