X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fswitch.h;h=d79af5d7169614d2b7ba536d47208a5270b312b0;hb=5f1b986185717577aac1922544cb3a7b1a56b632;hp=8a2974fcd999bafde09a9e46bfc274ad6dbde4dd;hpb=44d0fa6a2b24a84e5eb0d54959ed91c1d4f15343;p=pintos-anon diff --git a/src/threads/switch.h b/src/threads/switch.h index 8a2974f..d79af5d 100644 --- a/src/threads/switch.h +++ b/src/threads/switch.h @@ -1,5 +1,5 @@ -#ifndef HEADER_SWITCH_H -#define HEADER_SWITCH_H 1 +#ifndef THREADS_SWITCH_H +#define THREADS_SWITCH_H #ifndef __ASSEMBLER__ /* switch_thread()'s stack frame. */ @@ -10,15 +10,16 @@ struct switch_threads_frame uint32_t esi; /* 8: Saved %esi. */ uint32_t edi; /* 12: Saved %edi. */ void (*eip) (void); /* 16: Return address. */ - struct thread *cur; /* 20: thread_switch()'s CUR argument. */ - struct thread *next; /* 24: thread_switch()'s NEXT argument. */ + struct thread *cur; /* 20: switch_threads()'s CUR argument. */ + struct thread *next; /* 24: switch_threads()'s NEXT argument. */ }; /* Switches from CUR, which must be the running thread, to NEXT, - which must also be running thread_switch(), returning CUR in + which must also be running switch_threads(), returning CUR in NEXT's context. */ struct thread *switch_threads (struct thread *cur, struct thread *next); +/* Stack frame for switch_entry(). */ struct switch_entry_frame { void (*eip) (void); @@ -35,4 +36,4 @@ void switch_thunk (void); #define SWITCH_CUR 20 #define SWITCH_NEXT 24 -#endif /* switch.h */ +#endif /* threads/switch.h */