summaryrefslogtreecommitdiffstats
path: root/third_party/rust/mach/src/port.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/rust/mach/src/port.rs
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/mach/src/port.rs')
-rw-r--r--third_party/rust/mach/src/port.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/rust/mach/src/port.rs b/third_party/rust/mach/src/port.rs
new file mode 100644
index 0000000000..e43e81d0d3
--- /dev/null
+++ b/third_party/rust/mach/src/port.rs
@@ -0,0 +1,26 @@
+//! This module corresponds to `mach/port.h`
+
+use vm_types::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;