Ex_regs: Change 'user_flags'

Return true if thread is ready.

Was: 'foc_exregs_ret_state.patch'
This commit is contained in:
Sebastian Sumpf
2013-01-11 17:27:42 +01:00
parent d6ec37874b
commit eb39c103a6
2 changed files with 5 additions and 2 deletions

View File

@@ -419,7 +419,7 @@ Thread::user_ip() const
IMPLEMENT inline
Mword
Thread::user_flags() const
{ return 0; }
{ return state() & Thread_ready; }
IMPLEMENT inline NEEDS[Thread::exception_triggered]
void

View File

@@ -92,7 +92,10 @@ Thread::user_ip() const
IMPLEMENT inline
Mword
Thread::user_flags() const
{ return regs()->flags(); }
{
// pass thread-ready state in carry flag (Thread_ready is bit 0)
return (regs()->flags() & ~Thread_ready) | (state() & Thread_ready);
}
/** Check if the pagefault occured at a special place: At some places in the
kernel we want to ensure that a specific address is mapped. The regular