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>
Thu, 24 Feb 2022 17:56:44 +0000 (09:56 -0800)
commitd926009c8bf6b37526889582af51312c067fbbe7
tree92f3f8d01680f8d78df4fa44bfe7cc0e9079e2d8
parent81e4b6f2de046e957aaae36589fbe9e850518182
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