Skip to content

Commit 5484d39

Browse files
committed
Small tidy up.
1 parent a155b34 commit 5484d39

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/main/c/truffleposix/truffleposix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ static void mark_ready_from_set(fd_set *set, int nfds, int *fds) {
111111
}
112112
}
113113

114-
int truffleposix_poll(int fd, int events, int timeout) {
114+
int truffleposix_poll(int fd, int events, int timeout_ms) {
115115
struct pollfd fds;
116116

117117
fds.fd = fd;
118118
fds.events = events;
119119

120-
return poll(&fds, 1, timeout);
120+
return poll(&fds, 1, timeout_ms);
121121
}
122122

123123
int truffleposix_select(int nread, int *readfds, int nwrite, int *writefds,

src/main/ruby/truffleruby/core/posix.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ def self.attach_function_eagerly(native_name, argument_types, return_type,
214214
attach_function :open, [:string, :int, varargs(:mode_t)], :int
215215
attach_function :opendir, [:string], :pointer
216216
attach_function :pipe, [:pointer], :int
217-
attach_function :poll, [:pointer, :long, :int], :int, LIBC, true
218217
attach_function :truffleposix_poll, [:pointer, :long, :int], :int, LIBTRUFFLEPOSIX, true
219218
attach_function :read, [:int, :pointer, :size_t], :ssize_t, LIBC, true
220219
attach_function :readlink, [:string, :pointer, :size_t], :ssize_t

src/main/ruby/truffleruby/core/truffle/io_operations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def self.poll(io, event_mask, timeout)
211211

212212
raise ArgumentError, 'timeout must be positive' if timeout < 0
213213

214-
# Microseconds, rounded down
214+
# Milliseconds, rounded down
215215
timeout = remaining_timeout = (timeout * 1_000).to_i
216216
start = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
217217
deadline = start + timeout

0 commit comments

Comments
 (0)