pollevent.hh (9989:ba3be87e2a1d) pollevent.hh (10905:a6ca6831e775)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 26 unchanged lines hidden (view full) ---

35
36#include <vector>
37
38#include "sim/core.hh"
39
40class Checkpoint;
41class PollQueue;
42
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 26 unchanged lines hidden (view full) ---

35
36#include <vector>
37
38#include "sim/core.hh"
39
40class Checkpoint;
41class PollQueue;
42
43class PollEvent
43class PollEvent : public Serializable
44{
45 private:
46 friend class PollQueue;
47
48 protected:
49 pollfd pfd;
50 PollQueue *queue;
51 bool enabled;
52
53 public:
54 PollEvent(int fd, int event);
55 virtual ~PollEvent();
56
57 void disable();
58 void enable();
59 virtual void process(int revent) = 0;
60
61 bool queued() { return queue != 0; }
62
44{
45 private:
46 friend class PollQueue;
47
48 protected:
49 pollfd pfd;
50 PollQueue *queue;
51 bool enabled;
52
53 public:
54 PollEvent(int fd, int event);
55 virtual ~PollEvent();
56
57 void disable();
58 void enable();
59 virtual void process(int revent) = 0;
60
61 bool queued() { return queue != 0; }
62
63 virtual void serialize(std::ostream &os);
64 virtual void unserialize(Checkpoint *cp, const std::string &section);
63 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
64 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
65};
66
67class PollQueue
68{
69 private:
70 typedef std::vector<PollEvent *> eventvec_t;
71 eventvec_t events;
72

--- 20 unchanged lines hidden ---
65};
66
67class PollQueue
68{
69 private:
70 typedef std::vector<PollEvent *> eventvec_t;
71 eventvec_t events;
72

--- 20 unchanged lines hidden ---