sched/wdog: Remove wd_recover.

This commit Removed wd_recover.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen
2025-09-02 17:03:31 +08:00
committed by Xiang Xiao
parent 28298b9d5e
commit 694dfc7a0c
5 changed files with 3 additions and 94 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ void nxtask_recover(FAR struct tcb_s *tcb)
/* The task is being deleted. Cancel in pending timeout events. */
wd_recover(tcb);
wd_cancel(&tcb->waitdog);
/* If the thread holds semaphore counts or is waiting for a semaphore
* count, then release the counts.
+1 -1
View File
@@ -21,4 +21,4 @@
# ##############################################################################
target_sources(sched PRIVATE wd_initialize.c wd_start.c wd_cancel.c
wd_gettime.c wd_recover.c)
wd_gettime.c)
+1 -1
View File
@@ -20,7 +20,7 @@
#
############################################################################
CSRCS += wd_initialize.c wd_start.c wd_cancel.c wd_gettime.c wd_recover.c
CSRCS += wd_initialize.c wd_start.c wd_cancel.c wd_gettime.c
# Include wdog build support
-69
View File
@@ -1,69 +0,0 @@
/****************************************************************************
* sched/wdog/wd_recover.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/wdog.h>
#include <nuttx/sched.h>
#include "wdog/wdog.h"
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: wd_recover
*
* Description:
* This function is called from nxtask_recover() when a task is deleted via
* task_delete() or via pthread_cancel(). It checks if the deleted task
* is waiting for a timed event and if so cancels the timeout
*
* Input Parameters:
* tcb - The TCB of the terminated task or thread
*
* Returned Value:
* None.
*
* Assumptions:
* This function is called from task deletion logic in a safe context.
*
****************************************************************************/
void wd_recover(FAR struct tcb_s *tcb)
{
/* The task is being deleted. If it is waiting for any timed event, then
* cancel the watchdog now so that no events occur after the watchdog
* expires. Obviously there are lots of race conditions here so this will
* most certainly have to be revisited in the future.
*
*/
wd_cancel(&tcb->waitdog);
}
-22
View File
@@ -98,28 +98,6 @@ clock_t wd_timer(clock_t ticks, bool noswitches);
void wd_timer(clock_t ticks);
#endif
/****************************************************************************
* Name: wd_recover
*
* Description:
* This function is called from nxtask_recover() when a task is deleted via
* task_delete() or via pthread_cancel(). It checks if the deleted task
* is waiting for a timed event and if so cancels the timeout
*
* Input Parameters:
* tcb - The TCB of the terminated task or thread
*
* Returned Value:
* None.
*
* Assumptions:
* This function is called from task deletion logic in a safe context.
*
****************************************************************************/
struct tcb_s;
void wd_recover(FAR struct tcb_s *tcb);
#undef EXTERN
#ifdef __cplusplus
}