Use panic macro where suitable
This commit is contained in:
parent
6c21ac7669
commit
0d8a1af1ff
2 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ void kfree(void *pa) {
|
||||||
// Assert that page is a ligned to a page boundary and that its correctly
|
// Assert that page is a ligned to a page boundary and that its correctly
|
||||||
// sized
|
// sized
|
||||||
if (((u64)pa % PGSIZE) != 0 || (char *)pa < kernel_end || (u64)pa >= PHYSTOP)
|
if (((u64)pa % PGSIZE) != 0 || (char *)pa < kernel_end || (u64)pa >= PHYSTOP)
|
||||||
panic("kfree");
|
PANIC("kfree");
|
||||||
|
|
||||||
// Fill with junk to catch dangling refs.
|
// Fill with junk to catch dangling refs.
|
||||||
memset(pa, 1, PGSIZE);
|
memset(pa, 1, PGSIZE);
|
||||||
|
|
|
@ -64,10 +64,10 @@ uint32_t pop_off(void) {
|
||||||
Cpu *cpu = mycpu();
|
Cpu *cpu = mycpu();
|
||||||
|
|
||||||
if (intr_get())
|
if (intr_get())
|
||||||
panic("pop_off - interruptible");
|
PANIC("pop_off - interruptible");
|
||||||
|
|
||||||
if (cpu->noff < 1)
|
if (cpu->noff < 1)
|
||||||
panic("pop_off");
|
PANIC("pop_off");
|
||||||
|
|
||||||
cpu->noff -= 1;
|
cpu->noff -= 1;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue