async.hh revision 1762
14338Sgblack@eecs.umich.edu/* 24338Sgblack@eecs.umich.edu * Copyright (c) 2003-2005 The Regents of The University of Michigan 34338Sgblack@eecs.umich.edu * All rights reserved. 44338Sgblack@eecs.umich.edu * 54338Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 64338Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 74338Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 84338Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 94338Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 104338Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 114338Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 124338Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 134338Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 144338Sgblack@eecs.umich.edu * this software without specific prior written permission. 154338Sgblack@eecs.umich.edu * 164338Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 174338Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 184338Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 194338Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 204338Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 214338Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 224338Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 234338Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 244338Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 254338Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 264338Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 274338Sgblack@eecs.umich.edu */ 284338Sgblack@eecs.umich.edu 294338Sgblack@eecs.umich.edu#ifndef __ASYNC_HH__ 304338Sgblack@eecs.umich.edu#define __ASYNC_HH__ 314338Sgblack@eecs.umich.edu 324338Sgblack@eecs.umich.edu/// 334338Sgblack@eecs.umich.edu/// @file sim/async.hh 344338Sgblack@eecs.umich.edu/// This file defines flags used to handle asynchronous simulator events. 354338Sgblack@eecs.umich.edu/// 364338Sgblack@eecs.umich.edu 374338Sgblack@eecs.umich.edu/// @name Asynchronous event flags. 384338Sgblack@eecs.umich.edu/// To avoid races, signal handlers simply set these flags, which are 394338Sgblack@eecs.umich.edu/// then checked in the main event loop. Defined in main.cc. 404338Sgblack@eecs.umich.edu/// @note See the PollQueue object (in pollevent.hh) for the use of async_io and async_alarm. 414338Sgblack@eecs.umich.edu//@{ 424338Sgblack@eecs.umich.eduextern volatile bool async_event; ///< Some asynchronous event has happened. 434338Sgblack@eecs.umich.eduextern volatile bool async_dump; ///< Async request to dump stats. 444338Sgblack@eecs.umich.eduextern volatile bool async_exit; ///< Async request to exit simulator. 454338Sgblack@eecs.umich.eduextern volatile bool async_io; ///< Async I/O request (SIGIO). 464338Sgblack@eecs.umich.eduextern volatile bool async_alarm; ///< Async alarm event (SIGALRM). 474338Sgblack@eecs.umich.edu//@} 484338Sgblack@eecs.umich.edu 494338Sgblack@eecs.umich.edu#endif // __ASYNC_HH__ 504338Sgblack@eecs.umich.edu