summaryrefslogtreecommitdiff
path: root/base/pollevent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/pollevent.cc')
-rw-r--r--base/pollevent.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/base/pollevent.cc b/base/pollevent.cc
index 45a32581f..619bda887 100644
--- a/base/pollevent.cc
+++ b/base/pollevent.cc
@@ -38,6 +38,9 @@
#include "base/misc.hh"
#include "base/pollevent.hh"
#include "sim/universe.hh"
+#include "sim/serialize.hh"
+
+using namespace std;
PollQueue pollQueue;
@@ -76,6 +79,22 @@ PollEvent::enable()
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 &section)
+{
+ UNSERIALIZE_SCALAR(pfd.fd);
+ UNSERIALIZE_SCALAR(pfd.events);
+ UNSERIALIZE_SCALAR(enabled);
+}
+
/////////////////////////////////////////////////////
//
PollQueue::PollQueue()