arch,cpu,mem: Replace the mmmapped IPR mechanism with local accesses.
[gem5.git] / src / base / pollevent.hh
index ecaeb94ce9b2db4bfded43e14dcc461f5d4c6c0e..67dca68a2bc1218a4ae568a211bff7fd16996d2d 100644 (file)
  * 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;
@@ -58,8 +58,8 @@ class PollEvent
 
     bool queued() { return queue != 0; }
 
-    virtual void serialize(std::ostream &os);
-    virtual void unserialize(Checkpoint *cp, const std::string &section);
+    void serialize(CheckpointOut &cp) const override;
+    void unserialize(CheckpointIn &cp) override;
 };
 
 class PollQueue
@@ -81,17 +81,8 @@ 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;