system_events.hh revision 720
12686Sksewell@umich.edu/*
22100SN/A * Copyright (c) 2003 The Regents of The University of Michigan
35254Sksewell@umich.edu * All rights reserved.
45254Sksewell@umich.edu *
55254Sksewell@umich.edu * Redistribution and use in source and binary forms, with or without
65254Sksewell@umich.edu * modification, are permitted provided that the following conditions are
75254Sksewell@umich.edu * met: redistributions of source code must retain the above copyright
85254Sksewell@umich.edu * notice, this list of conditions and the following disclaimer;
95254Sksewell@umich.edu * redistributions in binary form must reproduce the above copyright
105254Sksewell@umich.edu * notice, this list of conditions and the following disclaimer in the
115254Sksewell@umich.edu * documentation and/or other materials provided with the distribution;
125254Sksewell@umich.edu * neither the name of the copyright holders nor the names of its
135254Sksewell@umich.edu * contributors may be used to endorse or promote products derived from
145254Sksewell@umich.edu * this software without specific prior written permission.
155254Sksewell@umich.edu *
165254Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
175254Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
185254Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
195254Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
205254Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
215254Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
225254Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
235254Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
245254Sksewell@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
255254Sksewell@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
265254Sksewell@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
275254Sksewell@umich.edu */
285254Sksewell@umich.edu
295254Sksewell@umich.edu#ifndef __SYSTEM_EVENTS_HH__
305254Sksewell@umich.edu#define __SYSTEM_EVENTS_HH__
315254Sksewell@umich.edu
322706Sksewell@umich.edu#include "cpu/pc_event.hh"
332022SN/A
342022SN/Aclass System;
352043SN/A
362024SN/Aclass SkipFuncEvent : public PCEvent
372024SN/A{
382043SN/A  public:
392686Sksewell@umich.edu    SkipFuncEvent(PCEventQueue *q, const std::string &desc)
404661Sksewell@umich.edu        : PCEvent(q, desc) {}
412022SN/A    virtual void process(ExecContext *xc);
422083SN/A};
432686Sksewell@umich.edu
442101SN/Aclass FnEvent : public PCEvent
452043SN/A{
462043SN/A  public:
472101SN/A    FnEvent(PCEventQueue *q, const std::string &desc, System *system);
482101SN/A    virtual void process(ExecContext *xc);
496384Sgblack@eecs.umich.edu    std::string myname() const { return _name; }
506384Sgblack@eecs.umich.edu
516384Sgblack@eecs.umich.edu  private:
526384Sgblack@eecs.umich.edu    std::string _name;
536384Sgblack@eecs.umich.edu    Statistics::MainBin *myBin;
546384Sgblack@eecs.umich.edu};
552101SN/A
562101SN/A#endif // __SYSTEM_EVENTS_HH__
572101SN/A