system_events.hh revision 2680
1720SN/A/*
21762SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan
3720SN/A * All rights reserved.
4720SN/A *
5720SN/A * Redistribution and use in source and binary forms, with or without
6720SN/A * modification, are permitted provided that the following conditions are
7720SN/A * met: redistributions of source code must retain the above copyright
8720SN/A * notice, this list of conditions and the following disclaimer;
9720SN/A * redistributions in binary form must reproduce the above copyright
10720SN/A * notice, this list of conditions and the following disclaimer in the
11720SN/A * documentation and/or other materials provided with the distribution;
12720SN/A * neither the name of the copyright holders nor the names of its
13720SN/A * contributors may be used to endorse or promote products derived from
14720SN/A * this software without specific prior written permission.
15720SN/A *
16720SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17720SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18720SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19720SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20720SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21720SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22720SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23720SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24720SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25720SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26720SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Lisa Hsu
292665Ssaidi@eecs.umich.edu *          Ali Saidi
30720SN/A */
31720SN/A
32720SN/A#ifndef __SYSTEM_EVENTS_HH__
33720SN/A#define __SYSTEM_EVENTS_HH__
34720SN/A
351885SN/A#include "cpu/pc_event.hh"
361885SN/A
37720SN/Aclass System;
38720SN/A
39720SN/Aclass SkipFuncEvent : public PCEvent
40720SN/A{
41720SN/A  public:
421885SN/A    SkipFuncEvent(PCEventQueue *q, const std::string &desc, Addr addr)
431885SN/A        : PCEvent(q, desc, addr)
441885SN/A    {}
452680Sktlim@umich.edu    virtual void process(ThreadContext *tc);
46720SN/A};
47720SN/A
48720SN/Aclass FnEvent : public PCEvent
49720SN/A{
50720SN/A  public:
511885SN/A    FnEvent(PCEventQueue *q, const std::string &desc, Addr addr,
521885SN/A            Stats::MainBin *bin);
532680Sktlim@umich.edu    virtual void process(ThreadContext *tc);
54720SN/A    std::string myname() const { return _name; }
55720SN/A
56720SN/A  private:
57720SN/A    std::string _name;
581070SN/A    Stats::MainBin *mybin;
59720SN/A};
60720SN/A
611070SN/Aclass IdleStartEvent : public PCEvent
621070SN/A{
631070SN/A  public:
641885SN/A    IdleStartEvent(PCEventQueue *q, const std::string &desc, Addr addr)
651885SN/A        : PCEvent(q, desc, addr)
661070SN/A    {}
672680Sktlim@umich.edu    virtual void process(ThreadContext *tc);
681070SN/A};
691082SN/A
701082SN/Aclass InterruptStartEvent : public PCEvent
711082SN/A{
721082SN/A  public:
731885SN/A    InterruptStartEvent(PCEventQueue *q, const std::string &desc, Addr addr)
741885SN/A        : PCEvent(q, desc, addr)
751082SN/A    {}
762680Sktlim@umich.edu    virtual void process(ThreadContext *tc);
771082SN/A};
781082SN/A
791082SN/Aclass InterruptEndEvent : public PCEvent
801082SN/A{
811082SN/A  public:
821885SN/A    InterruptEndEvent(PCEventQueue *q, const std::string &desc, Addr addr)
831885SN/A        : PCEvent(q, desc, addr)
841082SN/A    {}
852680Sktlim@umich.edu    virtual void process(ThreadContext *tc);
861082SN/A};
871082SN/A
881082SN/A
89720SN/A#endif // __SYSTEM_EVENTS_HH__
90