Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: sync: add Arc::DATA_OFFSET

This constant will be used to expose some offset constants from the Rust
Binder driver to tracepoints which are implemented in C. The constant is
usually equal to sizeof(refcount_t), but may be larger if T has a large
alignment.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://patch.msgid.link/20251203-binder-trace1-v1-1-22d3ffddb44e@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alice Ryhl and committed by
Greg Kroah-Hartman
c1093b85 0c4ce296

+3
+3
rust/kernel/sync/arc.rs
··· 240 240 // `Arc` object. 241 241 Ok(unsafe { Self::from_inner(inner) }) 242 242 } 243 + 244 + /// The offset that the value is stored at. 245 + pub const DATA_OFFSET: usize = core::mem::offset_of!(ArcInner<T>, data); 243 246 } 244 247 245 248 impl<T: ?Sized> Arc<T> {