counters_bindings/
counters_bindings.rs1#![expect(clippy::missing_safety_doc)]
8#![expect(non_camel_case_types)]
9#![expect(non_upper_case_globals)]
10#![no_std]
11
12#[repr(C)]
13#[derive(Default)]
14pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
15impl<T> __IncompleteArrayField<T> {
16 #[inline]
17 pub const fn new() -> Self {
18 __IncompleteArrayField(::core::marker::PhantomData, [])
19 }
20 #[inline]
21 pub fn as_ptr(&self) -> *const T {
22 self as *const _ as *const T
23 }
24 #[inline]
25 pub fn as_mut_ptr(&mut self) -> *mut T {
26 self as *mut _ as *mut T
27 }
28 #[inline]
29 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
30 unsafe { ::core::slice::from_raw_parts(self.as_ptr(), len) }
31 }
32 #[inline]
33 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
34 unsafe { ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) }
35 }
36}
37impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
38 fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
39 fmt.write_str("__IncompleteArrayField")
40 }
41}
42pub const counters_Type_kPadding: counters_Type = 0;
43pub const counters_Type_kSum: counters_Type = 1;
44pub const counters_Type_kMin: counters_Type = 2;
45pub const counters_Type_kMax: counters_Type = 3;
46pub type counters_Type = u64;
47#[repr(C)]
48#[derive(Debug, Copy, Clone)]
49pub struct counters_Descriptor {
50 pub name: [::core::ffi::c_char; 56usize],
51 pub type_: counters_Type,
52}
53#[repr(C)]
54#[derive(Debug)]
55pub struct counters_DescriptorVmo {
56 pub magic: u64,
57 pub max_cpus: u64,
58 pub descriptor_table_size: u64,
59 pub descriptor_table: __IncompleteArrayField<counters_Descriptor>,
60}
61pub const counters_DescriptorVmo_kVmoName: &[u8; 14] = b"counters/desc\0";
62pub const counters_DescriptorVmo_kMagic: u64 = 1547273975;