qemu/osdep: Move close_all_open_fds() to oslib-posix

Move close_all_open_fds() in oslib-posix, rename it
qemu_close_all_open_fds() and export it.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240802145423.3232974-2-cleger@rivosinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Clément Léger 2024-08-02 16:54:17 +02:00 committed by Richard Henderson
parent 5b0c2742c8
commit 4ec5ebea07
3 changed files with 42 additions and 36 deletions

View file

@ -757,6 +757,13 @@ static inline void qemu_reset_optind(void)
int qemu_fdatasync(int fd);
/**
* qemu_close_all_open_fd:
*
* Close all open file descriptors
*/
void qemu_close_all_open_fd(void);
/**
* Sync changes made to the memory mapped file back to the backing
* storage. For POSIX compliant systems this will fallback