kernel: record when a fiber is removed from a wait queue
Until now, this was not needed since the checks for being on a wait queue were only performed if a fiber was known to be on a timeout queue as well. However, an upcoming fix for _fiber_wakeup() needs to verify if a fiber is on a wait queue even if it is not timing out, because said fix needs to check if the fiber is timing out as well. Change-Id: If1694ceb551f2029d6a145963e81d3826956fd1d Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
b1903d7e48
commit
2aee77f8cf
2 changed files with 8 additions and 1 deletions
|
@ -40,12 +40,17 @@ static inline void _nano_timeout_tcs_init(struct tcs *tcs)
|
|||
*/
|
||||
tcs->nano_timeout.delta_ticks_from_prev = -1;
|
||||
|
||||
/*
|
||||
* Must be initialized here so that the _fiber_wakeup family of APIs can
|
||||
* verify the fiber is not on a wait queue before aborting a timeout.
|
||||
*/
|
||||
tcs->nano_timeout.wait_q = NULL;
|
||||
|
||||
/*
|
||||
* These are initialized when enqueing on the timeout queue:
|
||||
*
|
||||
* tcs->nano_timeout.node.next
|
||||
* tcs->nano_timeout.node.prev
|
||||
* tcs->nano_timeout.wait_q
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,8 @@ static inline void _nano_timeout_remove_tcs_from_wait_q(struct tcs *tcs)
|
|||
wait_q->tail = prev;
|
||||
}
|
||||
}
|
||||
|
||||
tcs->nano_timeout.wait_q = NULL;
|
||||
}
|
||||
#include <timeout_q.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue