From 1bba98be746ab9dc8b4038a78afaecba75a33d9c Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 29 Jan 2024 21:44:42 +0100 Subject: [PATCH 1/2] remove typo and rename system call to sys_poll --- hermit-abi/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermit-abi/src/lib.rs b/hermit-abi/src/lib.rs index 0c2664dc4..be3d8ef31 100644 --- a/hermit-abi/src/lib.rs +++ b/hermit-abi/src/lib.rs @@ -656,7 +656,7 @@ extern "C" { #[link_name = "sys_ioctl"] pub fn ioctl(s: i32, cmd: i32, argp: *mut c_void) -> i32; - #[link_name = "sys_pool"] + #[link_name = "sys_poll"] pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: i32) -> i32; /// listen for connections on a socket From f0ecc4ea60c1fb8d2465fca1b2925f76f5649a0a Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 29 Jan 2024 22:28:00 +0100 Subject: [PATCH 2/2] revise comments --- hermit-abi/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hermit-abi/src/lib.rs b/hermit-abi/src/lib.rs index be3d8ef31..3fafd2db4 100644 --- a/hermit-abi/src/lib.rs +++ b/hermit-abi/src/lib.rs @@ -256,9 +256,12 @@ pub struct timeval { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pollfd { - pub fd: i32, /* file descriptor */ - pub events: i16, /* events to look for */ - pub revents: i16, /* events returned */ + /// file descriptor + pub fd: i32, + /// events to look for + pub events: i16, + /// events returned + pub revents: i16, } #[repr(C)]