Mercurial > hg > Members > menikon > CbC_xv6
changeset 313:561eedeb9a99
ommit static variable at console
author | anatofuz |
---|---|
date | Thu, 06 Feb 2020 16:56:50 +0900 |
parents | cd9092628a63 |
children | 11cd1c607427 |
files | src/console.cbc src/impl/kernel_error.cbc |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console.cbc Thu Feb 06 16:43:26 2020 +0900 +++ b/src/console.cbc Thu Feb 06 16:56:50 2020 +0900 @@ -20,9 +20,9 @@ static void consputc (int); -static int panicked = 0; +int panicked = 0; -static struct { +struct { struct spinlock lock; int locking; } cons;
--- a/src/impl/kernel_error.cbc Thu Feb 06 16:43:26 2020 +0900 +++ b/src/impl/kernel_error.cbc Thu Feb 06 16:56:50 2020 +0900 @@ -30,12 +30,15 @@ __code panicKernelError(struct KernelError* error_gear, char* msg) { extern struct cpu* cpu; + extern struct { struct spinlock lock; int locking; } cons; + extern int panicked; + cli(); cons.locking = 0; cprintf("cpu%d: panic: ", cpu->id); - show_callstk(s); + show_callstk(msg); panicked = 1; // freeze other CPU goto infinity_loopKernelError(error_gear, error_gear->inifinity_loop);