summaryrefslogtreecommitdiff
path: root/src/unique_pipe.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-10-20 22:07:49 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-10-21 23:15:29 +0200
commite0a0365383a3baf1a13b68c476421a85d29a244b (patch)
tree6f04e9f9a1d17edc476835e045e656833b419f00 /src/unique_pipe.hh
parentaa1c7942422ce96ce8a47830ec78687932766a73 (diff)
signals: Replace pipe with eventfd
Simplify code.
Diffstat (limited to 'src/unique_pipe.hh')
-rw-r--r--src/unique_pipe.hh42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/unique_pipe.hh b/src/unique_pipe.hh
deleted file mode 100644
index c133018..0000000
--- a/src/unique_pipe.hh
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef UNIQUE_PIPE_HH
-#define UNIQUE_PIPE_HH
-
-#include "unique_fd.hh"
-
-#include <cstddef>
-
-class unique_pipe {
- public:
- unique_pipe();
- unique_pipe(unique_pipe&& fd);
- unique_pipe(unique_pipe const&) = delete;
- unique_pipe& operator=(unique_pipe const&) = delete;
-
- ~unique_pipe() = default;
-
- unique_pipe& operator=(unique_pipe&& fd);
-
- [[nodiscard]]
- int reader() const {
- return fd_[0].get();
- }
- [[nodiscard]]
- int writer() const {
- return fd_[1].get();
- }
-
- [[nodiscard]]
- explicit operator bool() const {
- return fd_[0] || fd_[1];
- }
-
- void reset();
-
- unique_fd release_reader();
- unique_fd release_writer();
-
- private:
- unique_fd fd_[2];
-};
-
-#endif // UNIQUE_PIPE_HH