Nucleus
Barry Kernel threads + threads share address space 6217f0d (3 years, 1 month ago)/* * This file contains the context switch routine. This routine will switch the * current context, but will not save any state, so it should only be called by * the scheduler. Since the stack and page directory will get switched, care * must be taken to read and set the registers in the correct order. */ .section .text .global context_switch .type copy_page_frame, @function .align 4 context_switch: .code32 cli mov 4(%esp), %ecx mov 8(%esp), %ebx mov 12(%esp), %esi mov 16(%esp), %edi mov 20(%esp), %ebp mov 24(%esp), %esp sti jmp *%ecx