#include "types.h"#include "defs.h"#include "param.h"#include "traps.h"#include "spinlock.h"#include "fs.h"#include "file.h"#include "mmu.h"#include "proc.h"#include "x86.h"Go to the source code of this file.
Defines | |
| #define | BACKSPACE 0x100 |
| #define | CRTPORT 0x3d4 |
| #define | INPUT_BUF 128 |
| #define | C(x) ((x)-'@') |
Functions | |
| static void | consputc (int) |
| static void | printint (int xx, int base, int sgn) |
| void | cprintf (char *fmt,...) |
| void | panic (char *s) |
| static void | cgaputc (int c) |
| void | consoleintr (int(*getc)(void)) |
| int | consoleread (struct inode *ip, char *dst, int n) |
| int | consolewrite (struct inode *ip, char *buf, int n) |
| void | consoleinit (void) |
Variables | |
| static int | panicked = 0 |
| struct { | |
| struct spinlock lock | |
| int locking | |
| } | cons |
| static ushort * | crt = (ushort*)0xb8000 |
| struct { | |
| struct spinlock lock | |
| char buf [INPUT_BUF] | |
| uint r | |
| uint w | |
| uint e | |
| } | input |
| #define BACKSPACE 0x100 |
| #define C | ( | x | ) | ((x)-'@') |
| #define INPUT_BUF 128 |
| static void cgaputc | ( | int | c | ) | [static] |
| void consoleinit | ( | void | ) |
Definition at line 272 of file console.c.
References cons, CONSOLE, consoleread(), consolewrite(), initlock(), input, ioapicenable(), IRQ_KBD, and picenable().
Referenced by mpmain().
| void consoleintr | ( | int(*)(void) | getc | ) |
Definition at line 180 of file console.c.
References acquire(), BACKSPACE, C, consputc(), input, INPUT_BUF, procdump(), release(), and wakeup().
Referenced by kbdintr(), and uartintr().
| int consoleread | ( | struct inode * | ip, | |
| char * | dst, | |||
| int | n | |||
| ) |
| int consolewrite | ( | struct inode * | ip, | |
| char * | buf, | |||
| int | n | |||
| ) |
Definition at line 257 of file console.c.
References acquire(), cons, consputc(), ilock(), iunlock(), and release().
Referenced by consoleinit().
| void consputc | ( | int | c | ) | [static] |
Definition at line 156 of file console.c.
References cgaputc(), cli(), panicked, and uartputc().
Referenced by consoleintr(), consolewrite(), cprintf(), and printint().
| void cprintf | ( | char * | fmt, | |
| ... | ||||
| ) |
Definition at line 51 of file console.c.
References acquire(), cons, consputc(), locking, printint(), and release().
Referenced by cpunum(), ideintr(), ioapicinit(), kalloc(), kinit(), mpinit(), mpmain(), panic(), procdump(), syscall(), and trap().
| void panic | ( | char * | s | ) |
Definition at line 101 of file console.c.
References cli(), cons, cprintf(), getcallerpcs(), panicked, and spinlock::pcs.
Referenced by acquire(), balloc(), bfree(), bget(), bmap(), brelse(), bwrite(), create(), dirlink(), dirlookup(), exit(), fileclose(), filedup(), fileread(), filewrite(), fork1(), ialloc(), iderw(), idestart(), iget(), ilock(), iput(), isdirempty(), iunlock(), kalloc(), kfree(), mpinit(), parseblock(), parsecmd(), parseexec(), parseredirs(), popcli(), release(), runcmd(), sched(), sleep(), sys_unlink(), and trap().
| static void printint | ( | int | xx, | |
| int | base, | |||
| int | sgn | |||
| ) | [static] |
struct { ... } cons [static] |
Referenced by consoleinit(), consolewrite(), cprintf(), and panic().
| struct { ... } input |
Referenced by consoleinit(), consoleintr(), and consoleread().
int panicked = 0 [static] |
Definition at line 172 of file console.c.
Referenced by fileread(), filewrite(), idewait(), kalloc(), kfree(), and stat().
1.5.6