tools/nolibc/types: move the FD_* functions to macros in types.h
authorWilly Tarreau <w@1wt.eu>
Sun, 13 Feb 2022 08:52:10 +0000 (09:52 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 14 Feb 2022 18:48:23 +0000 (10:48 -0800)
commitd0c4ca283607b231a40f3211d57434bdc044c125
tree32ac92c115df0d82bcb7049132f386c974994287
parent1b2e65a2c22378aa1c2041ac613e8194ad299349
tools/nolibc/types: move the FD_* functions to macros in types.h

FD_SET, FD_CLR, FD_ISSET, FD_ZERO are often expected to be macros and
not functions. In addition we already have a file dedicated to such
macros and types used by syscalls, it's types.h, so let's move them
there and turn them to macros. FD_CLR() and FD_ISSET() were missing,
so they were added. FD_ZERO() now deals with its own loop so that it
doesn't rely on memset() that sets one byte at a time.

Cc: David Laight <David.Laight@aculab.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/nolibc.h
tools/include/nolibc/types.h