2019-03-15 02:37:38 +01:00
|
|
|
/*
|
|
|
|
* IXSelectInterruptEventFd.h
|
|
|
|
* Author: Benjamin Sergeant
|
|
|
|
* Copyright (c) 2018-2019 Machine Zone, Inc. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "IXSelectInterrupt.h"
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace ix
|
|
|
|
{
|
|
|
|
class SelectInterruptEventFd : public SelectInterrupt {
|
|
|
|
public:
|
|
|
|
SelectInterruptEventFd();
|
|
|
|
virtual ~SelectInterruptEventFd();
|
|
|
|
|
|
|
|
bool init(std::string& errorMsg) final;
|
|
|
|
|
|
|
|
bool notify(uint64_t value) final;
|
|
|
|
bool clear() final;
|
|
|
|
uint64_t read() final;
|
2019-03-15 19:41:57 +01:00
|
|
|
int getFd() const final;
|
2019-03-15 02:37:38 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
int _eventfd;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|