kernel: remove K_TIMING thread flag
The fact that a thread is timing out was tracked via two flags: the K_TIMING thread flag bit, and the thread's timeout's delta_ticks_from_prev being -1 or not. This duplication could potentially cause discrepancies if the two flags got out-of-sync, and there was no benfits to having both. Since timeouts that are not parts of a thread rely on the value of delta_ticks_from_prev, standardize on it. Since the K_TIMING bit is removed from the thread's flags, K_READY would not reflect the reality anymore. It is removed and replaced by _is_thread_prevented_froM_running(), which looks at the state flags that are relevant. A thread that is ready now is not prevented from running and does not have an active timeout. Change-Id: I902ef9fb7801b00626df491f5108971817750daa Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
b2974a666d
commit
a36e0cf651
8 changed files with 63 additions and 64 deletions
|
@ -33,11 +33,6 @@
|
|||
/* thread is defined statically */
|
||||
#define K_STATIC (1 << 8)
|
||||
|
||||
#define K_READY 0
|
||||
|
||||
/* Thread is waiting on a timeout */
|
||||
#define K_TIMING (1 << 12)
|
||||
|
||||
/* Thread is waiting on an object */
|
||||
#define K_PENDING (1 << 13)
|
||||
|
||||
|
@ -53,9 +48,6 @@
|
|||
/* Not a real thread */
|
||||
#define K_DUMMY (1 << 17)
|
||||
|
||||
#define K_EXECUTION_MASK \
|
||||
(K_TIMING | K_PENDING | K_PRESTART | K_DEAD | K_SUSPENDED | K_DUMMY)
|
||||
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
/* thread uses floating point registers */
|
||||
#define K_FP_REGS (1 << 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue