* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
*/
#ifndef __POLLEVENT_H__
#define __POLLEVENT_H__
-#include <vector>
#include <poll.h>
+
+#include <vector>
+
#include "sim/core.hh"
class Checkpoint;
class PollQueue;
-class PollEvent
+class PollEvent : public Serializable
{
private:
friend class PollQueue;
bool queued() { return queue != 0; }
- virtual void serialize(std::ostream &os);
- virtual void unserialize(Checkpoint *cp, const std::string §ion);
+ void serialize(CheckpointOut &cp) const override;
+ void unserialize(CheckpointIn &cp) override;
};
class PollQueue
void schedule(PollEvent *event);
void service();
- protected:
- static bool handler;
- static struct sigaction oldio;
- static struct sigaction oldalrm;
-
public:
static void setupAsyncIO(int fd, bool set);
- static void handleIO(int);
- static void handleALRM(int);
- static void removeHandler();
- static void setupHandler();
};
extern PollQueue pollQueue;