[libc-commits] [libc] [llvm] [libc] add remaining epoll functions, pipe (PR #84587)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Thu Mar 21 11:29:26 PDT 2024


================
@@ -9,11 +9,11 @@
 #ifndef LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT_H
 #define LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT_H
 
-// TODO: Use this include once the include headers are also using quotes.
+// TODO: use our internal sigset_t type (issue #86034)
 // #include "include/llvm-libc-types/sigset_t.h"
-// #include "include/llvm-libc-types/struct_epoll_event.h"
+#include <signal.h>
 
-#include <sys/epoll.h>
+#include "include/llvm-libc-types/struct_epoll_event.h"
----------------
nickdesaulniers wrote:

Should this be using `struct epoll_event *` for `events`, rather than `epoll_event*` for `events` param?

Then we don't even need any forward declarations. TIL that in C++ not having the `struct`/(or probably `class`) keyword(s) doesn't allow you to have an incomplete or opaque type.

Example: https://godbolt.org/z/nfE8K7Whd

There's other cases of this above, like in libc/src/sys/epoll/epoll_ctl.h.

https://github.com/llvm/llvm-project/pull/84587


More information about the libc-commits mailing list