context::regs

watermirror 357836635 at qq.com
Wed Apr 29 08:20:11 CEST 2015


hi,the implemention of Context::regs() is like this:


return reinterpret_cast<Entry_frame*>(Cpu::stack_align(reinterpret_cast<Mword>(this + Size)) -1;


how this algorithm came out?i think the memory of the object is allocated by c++ compiler,  but why '(this + Size)' could get Entry_frame of a thread?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20150429/bd42e611/attachment.html>


More information about the l4-hackers mailing list