Ex_regs: Change 'user_flags'
Return true if thread is ready. Was: 'foc_exregs_ret_state.patch'
This commit is contained in:
committed by
Stefan Kalkowski
parent
f3d44f2a42
commit
b9323143ee
@@ -325,7 +325,7 @@ Thread::user_sp(Mword sp)
|
||||
IMPLEMENT inline
|
||||
Mword
|
||||
Thread::user_flags() const
|
||||
{ return 0; }
|
||||
{ return state() & Thread_ready; }
|
||||
|
||||
PUBLIC inline NEEDS ["trap_state.h"]
|
||||
int
|
||||
|
||||
@@ -80,7 +80,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);
|
||||
}
|
||||
|
||||
PRIVATE static inline
|
||||
Mword
|
||||
|
||||
Reference in New Issue
Block a user