diff options
author | Nathan Binkert <binkertn@umich.edu> | 2003-10-13 02:00:47 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2003-10-13 02:00:47 -0400 |
commit | b177f696ff10473d6421af90d740254d523c5f7e (patch) | |
tree | 2b026e53114f136e201980adbd3855e2cbf66798 /dev/console.hh | |
parent | 940c21475906d426dc03c7833254a03d93f937db (diff) | |
download | gem5-b177f696ff10473d6421af90d740254d523c5f7e.tar.xz |
Try to get the correct license on various files
remove stuff that is ambiguous
Clean up code a bit
arch/alpha/aout_machdep.h:
Add M5 License
docs/stl.hh:
M5 license
base/remote_gdb.cc:
Most of this is mine, so stick in the m5 license
dev/console.hh:
Clean up comments
merge simple() and out() into one function.
dev/console.hh:
dev/console.cc:
m5 license
dev/console.cc:
merge simple and out.
remove dead code
dev/console.cc:
Remove comments that weren't mine.
Clean up code
dev/console.hh:
update names
dev/alpha_console.cc:
use new interface
--HG--
extra : convert_revision : 3cd2357e1525db43c2ef9e89a9b47a47861d6af9
Diffstat (limited to 'dev/console.hh')
-rw-r--r-- | dev/console.hh | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/dev/console.hh b/dev/console.hh index ba4250db4..b88cab3ef 100644 --- a/dev/console.hh +++ b/dev/console.hh @@ -1,4 +1,30 @@ -/* $Id$ */ +/* + * Copyright (c) 2003 The Regents of The University of Michigan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * 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. + */ /* @file * User Console Interface @@ -69,8 +95,8 @@ class SimConsole : public SimObject protected: // interrupt status/enable - int intr_status; - int intr_enable; + int _status; + int _enable; // interrupt handle IntrControl *intr; @@ -79,16 +105,13 @@ class SimConsole : public SimObject ///////////////// // OS interface - // Input a character from the console. Returns the character (if - // any) or -1 if there is no character pending on this console. If - // no further characters are pending, the (input) interrupt is - // cleared. + // Get a character from the console. + // return of -1 means there is no character pending. + // Interrupts are cleared when the buffer is empty. int in(); - // Output a character to the console. This never fails, as this - // device doesn't model finite buffering capacity. - void out(char c); - void simple(char c); + // Send a character to the console + void out(char c, bool raise_int = true); enum { TransmitInterrupt = 1, @@ -96,7 +119,7 @@ class SimConsole : public SimObject }; // Read the current interrupt status of this console. - int intStatus(); + int intStatus() { return _status; } // Set the interrupt enable bits. int clearInt(int i); |