forked from len0rd/rockbox
In queue_wait_w_tmo, guarantee wait duration
It is possible to have a thread awoken and subsequently the message that was placed in the queue has been removed by the time the thread is able to check the queue. Ensure theads that failed to find a message do not return prematurely. It was at worst imprecise when a timeout is specified. It's entirely incorrect if the function ever returns with SYS_TIMEOUT when using TIMEOUT_BLOCK. Change-Id: Ibd41eae8c787adf7a320a24603cf64ff8a6da66a
This commit is contained in:
parent
1fa7c56351
commit
4d4b0c5a07
2 changed files with 41 additions and 22 deletions
|
|
@ -419,4 +419,9 @@ static inline void blocker_splay_init(struct blocker_splay *blsplay)
|
|||
corelock_init(&blsplay->cl);
|
||||
}
|
||||
|
||||
static inline long get_tmo_tick(struct thread_entry *thread)
|
||||
{
|
||||
return thread->tmo_tick;
|
||||
}
|
||||
|
||||
#endif /* THREAD_INTERNAL_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue