@@ -77,7 +77,7 @@ void ZVFS_FD_SET(int fd, struct zvfs_fd_set *set)
77
77
int z_impl_zvfs_select (int nfds , struct zvfs_fd_set * ZRESTRICT readfds ,
78
78
struct zvfs_fd_set * ZRESTRICT writefds ,
79
79
struct zvfs_fd_set * ZRESTRICT exceptfds ,
80
- const struct timeval * ZRESTRICT timeout )
80
+ const struct timespec * ZRESTRICT timeout , const void * ZRESTRICT sigmask )
81
81
{
82
82
struct zvfs_pollfd pfds [CONFIG_ZVFS_POLL_MAX ];
83
83
k_timeout_t poll_timeout ;
@@ -142,7 +142,8 @@ int z_impl_zvfs_select(int nfds, struct zvfs_fd_set *ZRESTRICT readfds,
142
142
if (timeout == NULL ) {
143
143
poll_timeout = K_FOREVER ;
144
144
} else {
145
- poll_timeout = K_USEC (timeout -> tv_sec * USEC_PER_SEC + timeout -> tv_usec );
145
+ poll_timeout =
146
+ K_USEC (timeout -> tv_sec * USEC_PER_SEC + timeout -> tv_nsec / NSEC_PER_USEC );
146
147
}
147
148
148
149
res = zvfs_poll_internal (pfds , num_pfds , poll_timeout );
@@ -220,10 +221,11 @@ int z_impl_zvfs_select(int nfds, struct zvfs_fd_set *ZRESTRICT readfds,
220
221
static int z_vrfy_zvfs_select (int nfds , struct zvfs_fd_set * ZRESTRICT readfds ,
221
222
struct zvfs_fd_set * ZRESTRICT writefds ,
222
223
struct zvfs_fd_set * ZRESTRICT exceptfds ,
223
- const struct timeval * ZRESTRICT timeout )
224
+ const struct timespec * ZRESTRICT timeout ,
225
+ const void * ZRESTRICT sigmask )
224
226
{
225
227
struct zvfs_fd_set * readfds_copy = NULL , * writefds_copy = NULL , * exceptfds_copy = NULL ;
226
- struct timeval * to = NULL ;
228
+ struct timespec * to = NULL ;
227
229
int ret = -1 ;
228
230
229
231
if (readfds ) {
@@ -261,7 +263,7 @@ static int z_vrfy_zvfs_select(int nfds, struct zvfs_fd_set *ZRESTRICT readfds,
261
263
}
262
264
}
263
265
264
- ret = z_impl_zvfs_select (nfds , readfds_copy , writefds_copy , exceptfds_copy , to );
266
+ ret = z_impl_zvfs_select (nfds , readfds_copy , writefds_copy , exceptfds_copy , to , sigmask );
265
267
266
268
if (ret >= 0 ) {
267
269
if (readfds_copy ) {
0 commit comments