Skip to content

Commit 17a2a76

Browse files
committed
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.
1 parent 417ffc9 commit 17a2a76

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libstd/sys/unix/process/zircon.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ use u64;
1717

1818
use libc::{c_int, c_void};
1919

20-
pub type zx_handle_t = i32;
20+
pub type zx_handle_t = u32;
2121
pub type zx_vaddr_t = usize;
2222
pub type zx_rights_t = u32;
2323
pub type zx_status_t = i32;
2424

25+
// TODO(raggi): zx_size_t was removed from Zircon. various syscall API docs use size_t here, but
26+
// don't define that well at the ABI level yet, as the C spec definition of size_t isn't what is
27+
// meant. In the future Zirocn will define size_t more strictly for it's ABI. At that time,
28+
// zx_size_t should be removed here, and replaced with an appropriately sized type with a
29+
// sufficiently strict definition.
2530
pub type zx_size_t = usize;
2631

2732
pub const ZX_HANDLE_INVALID: zx_handle_t = 0;

0 commit comments

Comments
 (0)