#include "base/misc.hh"
#include "base/pollevent.hh"
#include "sim/universe.hh"
+#include "sim/serialize.hh"
+
+using namespace std;
PollQueue pollQueue;
queue->copy();
}
+void
+PollEvent::serialize(ostream &os)
+{
+ SERIALIZE_SCALAR(pfd.fd);
+ SERIALIZE_SCALAR(pfd.events);
+ SERIALIZE_SCALAR(enabled);
+}
+
+void
+PollEvent::unserialize(Checkpoint *cp, const std::string §ion)
+{
+ UNSERIALIZE_SCALAR(pfd.fd);
+ UNSERIALIZE_SCALAR(pfd.events);
+ UNSERIALIZE_SCALAR(enabled);
+}
+
/////////////////////////////////////////////////////
//
PollQueue::PollQueue()
#include <poll.h>
#include "sim/universe.hh"
+class Checkpoint;
+
class PollEvent
{
private:
virtual void process(int revent) = 0;
bool queued() { return queue != 0; }
+
+ virtual void serialize(std::ostream &os);
+ virtual void unserialize(Checkpoint *cp, const std::string §ion);
};
class PollQueue