mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
39 lines
384 B
C++
39 lines
384 B
C++
#pragma once
|
|
|
|
#if defined(OS_LINUX)
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct EventFD
|
|
{
|
|
EventFD();
|
|
~EventFD();
|
|
|
|
/// Both read() and write() are blocking.
|
|
/// TODO: add non-blocking flag to ctor.
|
|
uint64_t read() const;
|
|
bool write(uint64_t increase = 1) const;
|
|
|
|
int fd = -1;
|
|
};
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct EventFD
|
|
{
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|