Skip to main content

zx_sys/
definitions.rs

1// Copyright 2022 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// DO NOT EDIT. Generated from FIDL library zx by zither, a Fuchsia platform
6// tool.
7
8// Re-export the types defined in the zx-types crate
9pub use zx_types::*;
10
11// Only link against zircon when targeting Fuchsia
12#[cfg(target_os = "fuchsia")]
13#[link(name = "zircon")]
14unsafe extern "C" {
15
16    pub fn zx_channel_read(
17        handle: zx_handle_t,
18        options: u32,
19        bytes: *mut u8,
20        handles: *mut zx_handle_t,
21        num_bytes: u32,
22        num_handles: u32,
23        actual_bytes: *mut u32,
24        actual_handles: *mut u32,
25    ) -> zx_status_t;
26
27    pub fn zx_channel_write(
28        handle: zx_handle_t,
29        options: u32,
30        bytes: *const u8,
31        num_bytes: u32,
32        handles: *const zx_handle_t,
33        num_handles: u32,
34    ) -> zx_status_t;
35
36    pub fn zx_clock_get_monotonic() -> zx_time_t;
37
38    pub fn zx_handle_close_many(handles: *const zx_handle_t, num_handles: usize) -> zx_status_t;
39
40    pub fn zx_ktrace_control(
41        handle: zx_handle_t,
42        action: u32,
43        options: u32,
44        ptr: *mut u8,
45    ) -> zx_status_t;
46
47    pub fn zx_nanosleep(deadline: zx_time_t) -> zx_status_t;
48
49    pub fn zx_process_exit(retcode: i64);
50
51    pub fn zx_syscall_next();
52
53    pub fn zx_syscall_test0();
54
55    pub fn zx_syscall_test1();
56
57    pub fn zx_syscall_test2();
58
59    pub fn zx_system_get_page_size() -> u32;
60
61}