net: sockets: move select() implementation to zvfs
Move the implementation of zsock_select() to zvfs_select(). This allows other types of file descriptors to also make use of select() functionality even when the network subsystem is not enabled. Additionally, it partially removes a dependency cycle between posix and networking by moving functionality into a mutual dependency. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
parent
881dc1fa7a
commit
b3d3d4fff7
12 changed files with 148 additions and 83 deletions
|
@ -22,3 +22,4 @@ CONFIG_POSIX_TIMERS=y
|
|||
CONFIG_POSIX_MESSAGE_PASSING=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_POSIX_C_LIB_EXT=y
|
||||
CONFIG_POSIX_DEVICE_IO=y
|
||||
|
|
|
@ -22,12 +22,14 @@ ZTEST(posix_headers, test_sys_select_h)
|
|||
fd_set fds = {0};
|
||||
|
||||
zassert_not_equal(-1, FD_SETSIZE);
|
||||
FD_CLR(0, &fds);
|
||||
FD_ISSET(0, &fds);
|
||||
FD_SET(0, &fds);
|
||||
FD_ZERO(&fds);
|
||||
|
||||
if (IS_ENABLED(CONFIG_POSIX_DEVICE_IO)) {
|
||||
|
||||
FD_CLR(0, &fds);
|
||||
FD_ISSET(0, &fds);
|
||||
FD_SET(0, &fds);
|
||||
FD_ZERO(&fds);
|
||||
|
||||
/* zassert_not_null(pselect); */ /* not implemented */
|
||||
zassert_not_null(select);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue