mirror of
https://github.com/SmallPond/MIT6.828_OS.git
synced 2026-05-03 01:33:33 +08:00
LAB 4 IS DONE.
This commit is contained in:
12
lab/user/faultnostack.c
Normal file
12
lab/user/faultnostack.c
Normal file
@@ -0,0 +1,12 @@
|
||||
// test user fault handler being called with no exception stack mapped
|
||||
|
||||
#include <inc/lib.h>
|
||||
|
||||
void _pgfault_upcall();
|
||||
|
||||
void
|
||||
umain(int argc, char **argv)
|
||||
{
|
||||
sys_env_set_pgfault_upcall(0, (void*) _pgfault_upcall);
|
||||
*(int*)0 = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user