X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fthreads%2Finterrupt.h;fp=src%2Fthreads%2Finterrupt.h;h=b805671e626d6891f1b43aa06de64674f15a91d6;hp=99abf8e3a92ddecff94064dd7bbaf5f0086e774d;hb=251b51f76f0594460e1cfbf2c05576fb445b861b;hpb=c9613f4d1fd208911409de6f82b430e5f9a595ae diff --git a/src/threads/interrupt.h b/src/threads/interrupt.h index 99abf8e..b805671 100644 --- a/src/threads/interrupt.h +++ b/src/threads/interrupt.h @@ -19,7 +19,7 @@ enum intr_level intr_disable (void); /* 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. */ @@ -34,13 +34,18 @@ struct intr_frame uint16_t es, :16; /* Saved ES segment register. */ uint16_t ds, :16; /* Saved DS segment register. */ - /* Pushed by intrXX_stub in intr-stubs.S (see intr-stubs.pl). */ + /* Pushed by intrNN_stub in intr-stubs.S. */ uint32_t vec_no; /* Interrupt vector number. */ /* Sometimes pushed by the CPU, - otherwise for consistency pushed as 0 by intrXX_stub. */ + 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. */ + /* 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. */ void (*eip) (void); /* Next instruction to execute. */