projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[pintos-anon]
/
src
/
threads
/
interrupt.h
diff --git
a/src/threads/interrupt.h
b/src/threads/interrupt.h
index 7084bf14d96b559e78515a441382cf52e796bb75..b805671e626d6891f1b43aa06de64674f15a91d6 100644
(file)
--- a/
src/threads/interrupt.h
+++ b/
src/threads/interrupt.h
@@
-1,5
+1,5
@@
-#ifndef
HEADER
_INTERRUPT_H
-#define
HEADER_INTERRUPT_H 1
+#ifndef
THREADS
_INTERRUPT_H
+#define
THREADS_INTERRUPT_H
#include <stdbool.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
@@
-19,7
+19,7
@@
enum intr_level intr_disable (void);
/* Interrupt stack frame. */
struct intr_frame
{
/* Interrupt stack frame. */
struct intr_frame
{
- /* Pushed by intr_entry in intr-stubs.S
(see intr-stubs.pl)
.
+ /* Pushed by intr_entry in intr-stubs.S.
These are the interrupted task's saved registers. */
uint32_t edi; /* Saved EDI. */
uint32_t esi; /* Saved ESI. */
These are the interrupted task's saved registers. */
uint32_t edi; /* Saved EDI. */
uint32_t esi; /* Saved ESI. */
@@
-29,19
+29,26
@@
struct intr_frame
uint32_t edx; /* Saved EDX. */
uint32_t ecx; /* Saved ECX. */
uint32_t eax; /* Saved EAX. */
uint32_t edx; /* Saved EDX. */
uint32_t ecx; /* Saved ECX. */
uint32_t eax; /* Saved EAX. */
+ uint16_t gs, :16; /* Saved GS segment register. */
+ uint16_t fs, :16; /* Saved FS segment register. */
uint16_t es, :16; /* Saved ES segment register. */
uint16_t ds, :16; /* Saved DS segment register. */
uint16_t es, :16; /* Saved ES segment register. */
uint16_t ds, :16; /* Saved DS segment register. */
- /* Pushed by intr
XX_stub in intr-stubs.S (see intr-stubs.pl)
. */
+ /* Pushed by intr
NN_stub in intr-stubs.S
. */
uint32_t vec_no; /* Interrupt vector number. */
/* Sometimes pushed by the CPU,
uint32_t vec_no; /* Interrupt vector number. */
/* Sometimes pushed by the CPU,
- otherwise by intrXX_stub for consistency. */
+ otherwise for consistency pushed as 0 by intrNN_stub.
+ The CPU puts it just under `eip', but we move it here. */
uint32_t error_code; /* Error code. */
uint32_t error_code; /* Error code. */
+ /* Pushed by intrNN_stub in intr-stubs.S.
+ This frame pointer eases interpretation of backtraces. */
+ void *frame_pointer; /* Saved EBP (frame pointer). */
+
/* Pushed by the CPU.
These are the interrupted task's saved registers. */
/* Pushed by the CPU.
These are the interrupted task's saved registers. */
- void (*eip) (void); /*
Current or next instruction
. */
+ void (*eip) (void); /*
Next instruction to execute
. */
uint16_t cs, :16; /* Code segment for eip. */
uint32_t eflags; /* Saved CPU flags. */
void *esp; /* Saved stack pointer. */
uint16_t cs, :16; /* Code segment for eip. */
uint32_t eflags; /* Saved CPU flags. */
void *esp; /* Saved stack pointer. */
@@
-56,6
+63,7
@@
void intr_register (uint8_t vec, int dpl, enum intr_level, intr_handler_func *,
bool intr_context (void);
void intr_yield_on_return (void);
bool intr_context (void);
void intr_yield_on_return (void);
-const char *intr_name (int vec);
+void intr_dump_frame (const struct intr_frame *);
+const char *intr_name (uint8_t vec);
-#endif /* interrupt.h */
+#endif /*
threads/
interrupt.h */