the syscall stack frame and Context::regs method

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Apr 28 22:57:56 CEST 2015


On Tue Apr 28, 2015 at 15:42:14 +0800, watermirror wrote:
> i am reading the code about system call.
> 
> 
> after the sys_ipc_wrapper (in file kern/syscalls.cpp) is called.it get the thread's pointer by current_thread and then get the Syscall_frame. the code is like this:
> ...
> Thread *curr=current_thread();
> Syscall_frame *f = curr->regs();
> ...
> 
> i can not understand the relationship between curr->regs() and the system call's stack frame.

current_thread()->regs() points to the entry frame, i.e. the struct that
has all the register state from the user. Explained?


Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the l4-hackers mailing list