Skip to main content

evictor_bindings/
evictor_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.evictor-bindings.bindgen.
6
7#![expect(non_camel_case_types)]
8#![no_std]
9pub use event_bindings::AutounsignalEvent;
10pub type Thread = core::ffi::c_void;
11
12#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
13#[repr(C, align(8))]
14pub struct __BindgenOpaqueArray8<T>(pub T);
15impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray8<[T; N]> {
16    fn default() -> Self {
17        Self([<T as Default>::default(); N])
18    }
19}
20#[repr(C)]
21#[derive(Debug, Copy, Clone)]
22pub struct std_atomic<_Tp> {
23    pub _phantom_0: ::core::marker::PhantomData<::core::cell::UnsafeCell<_Tp>>,
24    pub _address: u8,
25}
26pub type std_atomic___base = u8;
27#[repr(C)]
28#[derive(Debug)]
29pub struct Evictor {
30    pub storage_: __BindgenOpaqueArray8<[u8; 288usize]>,
31}
32#[repr(u8)]
33#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
34pub enum Evictor_EvictionLevel {
35    OnlyOldest = 0,
36    IncludeNewest = 1,
37}
38#[repr(C)]
39#[derive(Debug, Copy, Clone)]
40pub struct Evictor_EvictionTarget {
41    pub pending: bool,
42    pub __bindgen_padding_0: [u8; 7usize],
43    pub free_pages_target: u64,
44    pub min_pages_to_free: u64,
45    pub level: Evictor_EvictionLevel,
46    pub print_counts: bool,
47    pub oom_trigger: bool,
48    pub __bindgen_padding_1: [u8; 5usize],
49}
50#[repr(C)]
51#[derive(Debug, Copy, Clone)]
52pub struct Evictor_EvictedPageCounts {
53    pub pager_backed: u64,
54    pub pager_backed_loaned: u64,
55    pub discardable: u64,
56    pub compressed: u64,
57}
58#[repr(C)]
59pub struct Evictor_StateLayout {
60    pub eviction_target: Evictor_EvictionTarget,
61    pub eviction_lock: __BindgenOpaqueArray8<[u8; 24usize]>,
62    pub total_evicted: Evictor_EvictedPageCounts,
63    pub lock: u32,
64    pub __bindgen_padding_0: [u8; 4usize],
65    pub eviction_thread: *mut Thread,
66    pub eviction_thread_exiting: u8,
67    pub __bindgen_padding_1: [u8; 7usize],
68    pub eviction_signal: AutounsignalEvent,
69    pub test_reclaim_function: __BindgenOpaqueArray8<[u8; 48usize]>,
70    pub test_free_pages_function: __BindgenOpaqueArray8<[u8; 48usize]>,
71    pub eviction_enabled: bool,
72    pub use_compression: bool,
73    pub __bindgen_padding_2: [u8; 6usize],
74}