foc: Select "thread-ready" bit in pause function

This commit is contained in:
Norman Feske 2013-03-14 16:34:56 +01:00
parent ce58a63fb6
commit 91b0578446
1 changed files with 5 additions and 1 deletions

View File

@ -93,7 +93,11 @@ void Platform_thread::pause()
*/
l4_thread_ex_regs_ret(_thread.local.dst(), &_pager_obj->state.ip,
&_pager_obj->state.sp, &flags);
bool in_syscall = flags == 0;
/*
* The thread state ("ready") is encoded in the lowest bit of the flags.
*/
bool in_syscall = (flags & 1) == 0;
_pager_obj->state.lock.unlock();
/**