Skip to content

Commit

Permalink
sched/wdog: remove wd_cancel_irq() implement
Browse files Browse the repository at this point in the history
we do not need this implement after change the lock from csec to spin_lock

Signed-off-by: chao an <[email protected]>
  • Loading branch information
anchao committed Jan 16, 2025
1 parent 118f827 commit 945bff9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 46 deletions.
19 changes: 0 additions & 19 deletions include/nuttx/wdog.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,25 +297,6 @@ static inline int wd_start_realtime(FAR struct wdog_s *wdog,

int wd_cancel(FAR struct wdog_s *wdog);

/****************************************************************************
* Name: wd_cancel_irq
*
* Description:
* This function cancels a currently running watchdog timer. Watchdog
* timers may be cancelled from the interrupt level. This function is
* intended to be called from critical sections.
*
* Input Parameters:
* wdog - ID of the watchdog to cancel.
*
* Returned Value:
* Zero (OK) is returned on success; A negated errno value is returned to
* indicate the nature of any failure.
*
****************************************************************************/

int wd_cancel_irq(FAR struct wdog_s *wdog);

/****************************************************************************
* Name: wd_gettime
*
Expand Down
28 changes: 1 addition & 27 deletions sched/wdog/wd_cancel.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,6 @@
****************************************************************************/

int wd_cancel(FAR struct wdog_s *wdog)
{
int ret;

ret = wd_cancel_irq(wdog);

return ret;
}

/****************************************************************************
* Name: wd_cancel_irq
*
* Description:
* This function cancels a currently running watchdog timer. Watchdog
* timers may be cancelled from the interrupt level. This function is
* intended to be called from critical sections.
*
* Input Parameters:
* wdog - ID of the watchdog to cancel.
*
* Returned Value:
* Zero (OK) is returned on success; A negated errno value is returned to
* indicate the nature of any failure.
*
****************************************************************************/

int wd_cancel_irq(FAR struct wdog_s *wdog)
{
irqstate_t flags;
bool head;
Expand Down Expand Up @@ -127,5 +101,5 @@ int wd_cancel_irq(FAR struct wdog_s *wdog)
nxsched_reassess_timer();
}

return OK;
return 0;
}

0 comments on commit 945bff9

Please sign in to comment.