◄ Wiki / Build
prologue / epilogue
The small bookkeeping code the compiler inserts at the start and end of every function to set up and tear down its workspace.
When a function is called, its prologue saves registers and reserves stack space; when it returns, its epilogue restores everything and hands control back. This standard entry/exit code is what makes nested calls and returns work reliably. Precisely where execution sits relative to these — for example whether a newly created thread resumes inside or outside a timer-interrupt's epilogue — determines whether the machine state is consistent on resume.
See also
- return frameThe saved snapshot of a thread's state that the CPU restores to resume it exactly where it left off.
- preemption / preemptiveWhen the OS forcibly pauses a running thread mid-execution to let a different one run.
- program counter (PC)The CPU register that holds the address of the instruction currently being executed.
Referenced by
preemption / preemptive · program counter (PC) · return frame