egos-2k+ syscall workflow --- sys_send/recv (syscall.c) | ^ +-> sys_invoke (syscall.c) [ret] | USER SPACE | -----[trap]-------------------------------------------------|---- | KERNEL | +-> trap_entry (cpu_intr.c) [mret] | | +-> trap_handler (kernel.c) [ret] [switch to kernel stack] [switch to user stack] ... | | | +-> proc_syscall (syscall.c) [ret] | | +-> proc_send/recv (syscall.c) [ret] | | +-> sys_yield (scheduler.c) [ret] | | +->[context switch] [switch back] | | +-->[other proc running]--+