mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 13:18:50 +08:00
sched/wdog: Change the return type of wd_gettime from int to sclock_t
to handle 64bits sclock_t correctly Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
753aa98ca7
commit
5b0b4bd586
3 changed files with 7 additions and 5 deletions
|
@ -569,8 +569,10 @@ static void governor_timer(int domain)
|
|||
|
||||
if (state < PM_SLEEP && !pdom->stay[pdom->state])
|
||||
{
|
||||
int delay = pmtick[state] + pdomstate->btime - clock_systime_ticks();
|
||||
int left = wd_gettime(&pdomstate->wdog);
|
||||
sclock_t delay = pmtick[state] +
|
||||
pdomstate->btime -
|
||||
clock_systime_ticks();
|
||||
sclock_t left = wd_gettime(&pdomstate->wdog);
|
||||
|
||||
if (delay <= 0)
|
||||
{
|
||||
|
|
|
@ -160,7 +160,7 @@ int wd_cancel(FAR struct wdog_s *wdog);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int wd_gettime(FAR struct wdog_s *wdog);
|
||||
sclock_t wd_gettime(FAR struct wdog_s *wdog);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int wd_gettime(FAR struct wdog_s *wdog)
|
||||
sclock_t wd_gettime(FAR struct wdog_s *wdog)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
|
@ -64,7 +64,7 @@ int wd_gettime(FAR struct wdog_s *wdog)
|
|||
*/
|
||||
|
||||
FAR struct wdog_s *curr;
|
||||
int delay = 0;
|
||||
sclock_t delay = 0;
|
||||
|
||||
for (curr = (FAR struct wdog_s *)g_wdactivelist.head;
|
||||
curr != NULL;
|
||||
|
|
Loading…
Reference in a new issue