Skip to main content

vm_page_list_bindings/
vm_page_list_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.vm-page-list-bindings.bindgen.
6
7#![expect(non_camel_case_types)]
8#![expect(non_upper_case_globals)]
9#![no_std]
10
11#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
12#[repr(C, align(8))]
13pub struct __BindgenOpaqueArray8<T>(pub T);
14impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray8<[T; N]> {
15    fn default() -> Self {
16        Self([<T as Default>::default(); N])
17    }
18}
19pub type VmPageListBtree = __BindgenOpaqueArray8<[u8; 8usize]>;
20#[repr(C)]
21#[repr(align(8))]
22#[derive(Debug, Copy, Clone)]
23pub struct VmPageListBtreeCursor {
24    pub _bindgen_opaque_blob: __BindgenOpaqueArray8<[u8; 16usize]>,
25}
26#[repr(C)]
27#[repr(align(8))]
28#[derive(Debug, Copy, Clone)]
29pub struct VmPageSpliceList {
30    pub _bindgen_opaque_blob: __BindgenOpaqueArray8<[u8; 32usize]>,
31}
32pub const VmPageSpliceList_State_Constructed: VmPageSpliceList_State = 0;
33pub const VmPageSpliceList_State_Initialized: VmPageSpliceList_State = 1;
34pub const VmPageSpliceList_State_Finalized: VmPageSpliceList_State = 2;
35pub const VmPageSpliceList_State_Processed: VmPageSpliceList_State = 3;
36pub type VmPageSpliceList_State = u8;
37#[repr(C)]
38#[derive(Debug, Copy, Clone)]
39pub struct VmPageListBtreeUtilization {
40    pub nodes_in_bytes: u64,
41    pub stored_values: u64,
42}
43#[repr(C)]
44#[repr(align(8))]
45#[derive(Debug, Copy, Clone)]
46pub struct VmPageListBtreeConstCursor {
47    pub _bindgen_opaque_blob: __BindgenOpaqueArray8<[u8; 16usize]>,
48}
49unsafe extern "C" {
50    pub fn cpp_vm_page_list_btree_init(tree: *mut u8);
51}
52unsafe extern "C" {
53    pub fn cpp_vm_page_list_btree_destroy(tree: *mut VmPageListBtree);
54}
55unsafe extern "C" {
56    pub fn cpp_vm_page_list_btree_is_empty(tree: *const VmPageListBtree) -> bool;
57}
58unsafe extern "C" {
59    pub fn cpp_vm_page_list_btree_clear(tree: *mut VmPageListBtree);
60}
61unsafe extern "C" {
62    pub fn cpp_vm_page_list_btree_find(
63        tree: *mut VmPageListBtree,
64        node_offset: u64,
65        out_cursor: *mut VmPageListBtreeCursor,
66    ) -> *mut ::core::ffi::c_void;
67}
68unsafe extern "C" {
69    pub fn cpp_vm_page_list_btree_find_const(
70        tree: *const VmPageListBtree,
71        node_offset: u64,
72    ) -> *const ::core::ffi::c_void;
73}
74unsafe extern "C" {
75    pub fn cpp_vm_page_list_btree_lower_bound(
76        tree: *mut VmPageListBtree,
77        node_offset: u64,
78        out_cursor: *mut VmPageListBtreeCursor,
79        out_offset: *mut u64,
80    ) -> *mut ::core::ffi::c_void;
81}
82unsafe extern "C" {
83    pub fn cpp_vm_page_list_btree_cursor_get(
84        cursor: *const VmPageListBtreeCursor,
85        out_offset: *mut u64,
86    ) -> *mut ::core::ffi::c_void;
87}
88unsafe extern "C" {
89    pub fn cpp_vm_page_list_btree_insert(
90        tree: *mut VmPageListBtree,
91        node_offset: u64,
92        cursor: *mut VmPageListBtreeCursor,
93    ) -> *mut ::core::ffi::c_void;
94}
95unsafe extern "C" {
96    pub fn cpp_vm_page_list_btree_erase_at(
97        tree: *mut VmPageListBtree,
98        cursor: *mut VmPageListBtreeCursor,
99    );
100}
101unsafe extern "C" {
102    pub fn cpp_vm_page_list_btree_cursor_default_init(cursor: *mut VmPageListBtreeCursor);
103}
104unsafe extern "C" {
105    pub fn cpp_vm_page_list_btree_cursor_init(
106        cursor: *mut VmPageListBtreeCursor,
107        tree: *mut VmPageListBtree,
108    );
109}
110unsafe extern "C" {
111    pub fn cpp_vm_page_list_btree_cursor_next(
112        cursor: *mut VmPageListBtreeCursor,
113        out_offset: *mut u64,
114    ) -> *mut ::core::ffi::c_void;
115}
116unsafe extern "C" {
117    pub fn cpp_vm_page_list_btree_cursor_prev(
118        cursor: *mut VmPageListBtreeCursor,
119        out_offset: *mut u64,
120    ) -> *mut ::core::ffi::c_void;
121}
122unsafe extern "C" {
123    pub fn cpp_vm_page_list_btree_const_cursor_init(
124        cursor: *mut VmPageListBtreeConstCursor,
125        tree: *const VmPageListBtree,
126    );
127}
128unsafe extern "C" {
129    pub fn cpp_vm_page_list_btree_const_cursor_next(
130        cursor: *mut VmPageListBtreeConstCursor,
131        out_offset: *mut u64,
132    ) -> *const ::core::ffi::c_void;
133}
134unsafe extern "C" {
135    pub fn cpp_vm_page_list_btree_calculate_utilization_slow(
136        tree: *const VmPageListBtree,
137    ) -> VmPageListBtreeUtilization;
138}