From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- third_party/rust/mach2/src/port.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 third_party/rust/mach2/src/port.rs (limited to 'third_party/rust/mach2/src/port.rs') diff --git a/third_party/rust/mach2/src/port.rs b/third_party/rust/mach2/src/port.rs new file mode 100644 index 0000000000..151a3aa40c --- /dev/null +++ b/third_party/rust/mach2/src/port.rs @@ -0,0 +1,28 @@ +//! This module corresponds to `mach/port.h` + +use vm_types::{integer_t, natural_t}; + +pub type mach_port_name_t = natural_t; + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Hash, PartialOrd, PartialEq, Eq, Ord)] +pub struct ipc_port; + +pub type ipc_port_t = *mut ipc_port; + +pub type mach_port_t = ::libc::c_uint; + +pub const MACH_PORT_NULL: mach_port_t = 0; +pub const MACH_PORT_DEAD: mach_port_t = !0; + +pub type mach_port_right_t = natural_t; + +pub const MACH_PORT_RIGHT_SEND: mach_port_right_t = 0; +pub const MACH_PORT_RIGHT_RECEIVE: mach_port_right_t = 1; +pub const MACH_PORT_RIGHT_SEND_ONCE: mach_port_right_t = 2; +pub const MACH_PORT_RIGHT_PORT_SET: mach_port_right_t = 3; +pub const MACH_PORT_RIGHT_DEAD_NAME: mach_port_right_t = 4; +pub const MACH_PORT_RIGHT_LABELH: mach_port_right_t = 5; +pub const MACH_PORT_RIGHT_NUMBER: mach_port_right_t = 6; + +pub type mach_port_delta_t = integer_t; -- cgit v1.2.3