shared/async: introduce asynchronous_close_many() helper

This commit is contained in:
Mike Yuan
2025-02-26 13:02:28 +01:00
parent 74cd56d31b
commit 4a5b06c5d1
2 changed files with 11 additions and 1 deletions
+7
View File
@@ -133,6 +133,13 @@ int asynchronous_close(int fd) {
return -EBADF; /* return an invalidated fd */
}
void asynchronous_close_many(const int fds[], size_t n_fds) {
assert(fds || n_fds == 0);
FOREACH_ARRAY(i, fds, n_fds)
asynchronous_close(*i);
}
int asynchronous_rm_rf(const char *p, RemoveFlags flags) {
int r;