Skip to main content

discardable_vmo_tracker_bindings/
discardable_vmo_tracker_bindings.rs

1// Copyright 2026 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This file is automatically generated by //zircon/kernel/vm:_kernel_bindgen_crate.discardable-vmo-tracker-bindings.bindgen.
6
7#![expect(non_camel_case_types)]
8#![no_std]
9
10#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
11#[repr(C, align(8))]
12pub struct __BindgenOpaqueArray8<T>(pub T);
13impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray8<[T; N]> {
14    fn default() -> Self {
15        Self([<T as Default>::default(); N])
16    }
17}
18#[repr(C)]
19#[derive(Debug, Copy, Clone)]
20pub struct VmCowPages_DiscardablePageCounts {
21    pub locked: u64,
22    pub unlocked: u64,
23}
24#[repr(C)]
25#[repr(align(8))]
26#[derive(Debug, Copy, Clone)]
27pub struct DiscardableVmoTracker {
28    pub _bindgen_opaque_blob: __BindgenOpaqueArray8<[u8; 48usize]>,
29}
30pub type DiscardableVmoTracker_DiscardablePageCounts = VmCowPages_DiscardablePageCounts;
31#[repr(C)]
32#[derive(Debug, Copy, Clone)]
33pub struct DiscardableVmoTracker_DiscardableVmosLock {
34    pub _base: __BindgenOpaqueArray8<[u8; 24usize]>,
35}
36unsafe extern "C" {
37    pub fn cpp_discardable_vmo_tracker_debug_is_reclaimable(
38        tracker: *const DiscardableVmoTracker,
39    ) -> bool;
40}
41unsafe extern "C" {
42    pub fn cpp_discardable_vmo_tracker_debug_is_unreclaimable(
43        tracker: *const DiscardableVmoTracker,
44    ) -> bool;
45}
46unsafe extern "C" {
47    pub fn cpp_discardable_vmo_tracker_debug_is_discarded(
48        tracker: *const DiscardableVmoTracker,
49    ) -> bool;
50}
51unsafe extern "C" {
52    pub fn cpp_discardable_vmo_tracker_debug_get_lock_count(
53        tracker: *const DiscardableVmoTracker,
54    ) -> u64;
55}
56unsafe extern "C" {
57    pub fn cpp_discardable_vmo_tracker_debug_discardable_page_counts(
58        out_counts: *mut DiscardableVmoTracker_DiscardablePageCounts,
59    );
60}