|
The Pedigree Project
0.1
|
Collaboration diagram for VirtualTerminalManager:Classes | |
| struct | VirtualTerminal |
Public Types | |
| enum | SwitchPermission { Allowed, Disallowed } |
| enum | SystemMode { Text, Graphics } |
Public Member Functions | |
| VirtualTerminalManager (DevFsDirectory *parentDir) | |
| bool | initialise () |
| void | activate (size_t n) |
| Starts the process of activating the given tty. More... | |
| void | reportPermission (SwitchPermission perm) |
| size_t | openInactive () |
| void | lockSwitching (bool locked) |
| size_t | getCurrentTerminalNumber () const |
| TextIO * | getCurrentTerminal () const |
| File * | getCurrentTerminalFile () const |
| struct vt_mode | getTerminalMode (size_t n) const |
| void | setTerminalMode (size_t n, struct vt_mode mode) |
| struct vt_stat | getState () const |
| void | setSystemMode (SystemMode mode) |
| SystemMode | getSystemMode () const |
| void | setInputMode (size_t n, TextIO::InputMode newMode) |
| TextIO::InputMode | getInputMode (size_t n) const |
Private Member Functions | |
| void | sendSignal (size_t n, bool acq) |
Private Attributes | |
| VirtualTerminal | m_Terminals [MAX_VT] |
| TextIO * | m_pTty |
| TextIO * | m_pTtys [MAX_VT] |
| File * | m_pTtyFiles [MAX_VT] |
| struct vt_mode | m_Modes [MAX_VT] |
| size_t | m_CurrentTty |
| size_t | m_WantedTty |
| size_t | m_NumTtys |
| DevFsDirectory * | m_ParentDir |
| bool | m_bSwitchingLocked |
| SystemMode | m_SystemMode |
Definition at line 32 of file VirtualTerminal.h.
| void VirtualTerminalManager::activate | ( | size_t | n | ) |
Starts the process of activating the given tty.
If we are currently using a VT with VT_AUTO mode, this just directly switches over. However, if the current VT is in VT_PROCESS mode, this tracks the pending switchover and then signals the current VT. That owning process will respond with an ioctl that leads to a call to reportPermission() that may or may not block the transition.
Definition at line 113 of file VirtualTerminal.cc.
| struct vt_mode VirtualTerminalManager::getTerminalMode | ( | size_t | n | ) | const |
| void VirtualTerminalManager::lockSwitching | ( | bool | locked | ) |
Lock switching altogether.
Definition at line 228 of file VirtualTerminal.cc.
| size_t VirtualTerminalManager::openInactive | ( | ) |
Find an inactive VT and open it, returning its number.
Definition at line 186 of file VirtualTerminal.cc.
References File::getName(), TextIO::initialise(), NOTICE, WARNING, and TextIO::writeStr().
| void VirtualTerminalManager::reportPermission | ( | SwitchPermission | perm | ) |
| void VirtualTerminalManager::setTerminalMode | ( | size_t | n, |
| struct vt_mode | mode | ||
| ) |
Definition at line 255 of file VirtualTerminal.cc.
References ERROR, Process::getThread(), Hex, Processor::information(), NOTICE, and PosixSubsystem::sendSignal().
1.8.11