1
0
Fork 0
mirror of https://gitlab.com/niansa/libcrosscoro.git synced 2025-03-06 20:53:32 +01:00

Another cleanup (removed poll entirely)

This commit is contained in:
Nils 2021-07-28 12:48:31 +02:00
parent cf6ef72276
commit db23d23637
3 changed files with 0 additions and 41 deletions

View file

@ -20,7 +20,6 @@ set(LIBCROSSCORO_SOURCE_FILES
inc/coro/generator.hpp
inc/coro/latch.hpp
inc/coro/mutex.hpp src/mutex.cpp
inc/coro/poll.hpp
inc/coro/ring_buffer.hpp
inc/coro/semaphore.hpp src/semaphore.cpp
inc/coro/shared_mutex.hpp

View file

@ -10,7 +10,6 @@
#include "coro/generator.hpp"
#include "coro/latch.hpp"
#include "coro/mutex.hpp"
#include "coro/poll.hpp"
#include "coro/ring_buffer.hpp"
#include "coro/semaphore.hpp"
#include "coro/shared_mutex.hpp"

View file

@ -1,39 +0,0 @@
#pragma once
#include <sys/epoll.h>
namespace coro
{
enum class poll_op : uint64_t
{
/// Poll for read operations.
read = EPOLLIN,
/// Poll for write operations.
write = EPOLLOUT,
/// Poll for read and write operations.
read_write = EPOLLIN | EPOLLOUT
};
inline auto poll_op_readable(poll_op op) -> bool
{
return (static_cast<uint64_t>(op) & EPOLLIN);
}
inline auto poll_op_writeable(poll_op op) -> bool
{
return (static_cast<uint64_t>(op) & EPOLLOUT);
}
enum class poll_status
{
/// The poll operation was was successful.
event,
/// The poll operation timed out.
timeout,
/// The file descriptor had an error while polling.
error,
/// The file descriptor has been closed by the remote or an internal error/close.
closed
};
} // namespace coro