mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
rusticl/util: make ThreadSafeCPtr Copy, Clone and transparent
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37377>
This commit is contained in:
parent
d52452a486
commit
b67be5d829
1 changed files with 2 additions and 1 deletions
|
|
@ -14,7 +14,8 @@ use std::{
|
|||
};
|
||||
|
||||
/// A wrapper around pointers to C data type which are considered thread safe.
|
||||
#[derive(Eq)]
|
||||
#[derive(Copy, Clone, Eq)]
|
||||
#[repr(transparent)]
|
||||
pub struct ThreadSafeCPtr<T>(NonNull<T>);
|
||||
|
||||
impl<T> ThreadSafeCPtr<T> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue