about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJames Tucker <jftucker@gmail.com>2017-10-04 14:08:53 -0700
committerJames Tucker <jftucker@gmail.com>2017-10-04 15:12:44 -0700
commit17a2a766ac61762fdec7e89c80ce9f8ac97bf654 (patch)
tree5566a19349d2f0f077d3e9a7a6890cbd2fa2dd9f /src
parent417ffc98dfc770c27f7f2d7430f0edf975576591 (diff)
downloadrust-17a2a766ac61762fdec7e89c80ce9f8ac97bf654.tar.gz
rust-17a2a766ac61762fdec7e89c80ce9f8ac97bf654.zip
zircon: the type of zx_handle_t is now unsigned
This is a kernel ABI change that landed today. I noticed some other ABI
issues and have left a note to cleanup once they are better defined.
Diffstat (limited to 'src')
-rw-r--r--src/libstd/sys/unix/process/zircon.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/process/zircon.rs b/src/libstd/sys/unix/process/zircon.rs
index b5ec11b40fd..8d0ad30f9c8 100644
--- a/src/libstd/sys/unix/process/zircon.rs
+++ b/src/libstd/sys/unix/process/zircon.rs
@@ -17,11 +17,16 @@ use u64;
 
 use libc::{c_int, c_void};
 
-pub type zx_handle_t = i32;
+pub type zx_handle_t = u32;
 pub type zx_vaddr_t = usize;
 pub type zx_rights_t = u32;
 pub type zx_status_t = i32;
 
+// TODO(raggi): zx_size_t was removed from Zircon. various syscall API docs use size_t here, but
+// don't define that well at the ABI level yet, as the C spec definition of size_t isn't what is
+// meant. In the future Zirocn will define size_t more strictly for it's ABI. At that time,
+// zx_size_t should be removed here, and replaced with an appropriately sized type with a
+// sufficiently strict definition.
 pub type zx_size_t = usize;
 
 pub const ZX_HANDLE_INVALID: zx_handle_t = 0;