| CS318 - Pintos
    Pintos source browser for JHU CS318 course | 
 
 
 
Go to the documentation of this file.
   39                      "#BR BOUND Range Exceeded Exception");
 
   49                      "#NM Device Not Available Exception");
 
   55                      "#XF SIMD Floating-Point Exception");
 
   89       printf (
"%s: dying due to interrupt %#04x (%s).\n",
 
  100       PANIC (
"Kernel bug - unexpected interrupt in kernel"); 
 
  105       printf (
"Interrupt %#04x (%s) in unknown segment %04x\n",
 
  137   asm (
"movl %%cr2, %0" : 
"=r" (fault_addr));
 
  154   printf (
"Page fault at %p: %s error %s page in %s context.\n",
 
  156           not_present ? 
"not present" : 
"rights violation",
 
  157           write ? 
"writing" : 
"reading",
 
  158           user ? 
"user" : 
"kernel");
 
  
static void kill(struct intr_frame *)
Handler for an exception (probably) caused by a user process.
int write(int fd, const void *buffer, unsigned size)
#define SEL_KCSEG
Kernel code selector.
const char * thread_name(void)
Returns the name of the running thread.
#define PF_W
0: read, 1: write.
static void page_fault(struct intr_frame *)
Page fault handler.
#define PF_P
Page fault error code bits that describe the cause of the exception.
#define PANIC(...)
Halts the OS, printing the source file name, line number, and function name, plus a user-specific mes...
int printf(const char *format,...)
Writes formatted output to the console.
enum intr_level intr_enable(void)
Enables interrupts and returns the previous interrupt status.
static long long page_fault_cnt
Number of page faults processed.
const char * intr_name(uint8_t vec)
Returns the name of interrupt VEC.
void thread_exit(void)
Deschedules the current thread and destroys it.
void intr_register_int(uint8_t vec_no, int dpl, enum intr_level level, intr_handler_func *handler, const char *name)
Registers internal interrupt VEC_NO to invoke HANDLER, which is named NAME for debugging purposes.
#define SEL_UCSEG
Segment selectors.
void intr_dump_frame(const struct intr_frame *f)
Dumps interrupt frame F to the console, for debugging.
void exception_print_stats(void)
Prints exception statistics.
uint16_t uint16_t uint16_t uint16_t uint32_t vec_no
Saved DS segment register.
uint32_t error_code
Error code.
#define PF_U
0: kernel, 1: user process.
void exception_init(void)
Registers handlers for interrupts that can be caused by user programs.