source: rtems/cpukit/score/src/watchdogremove.c @ 8a8b95aa

5
Last change on this file since 8a8b95aa was 4c20da4b, checked in by Sebastian Huber <sebastian.huber@…>, on 04/04/19 at 07:18:11

doxygen: Rename Score* groups in RTEMSScore*

Update #3706

  • Property mode set to 100644
File size: 895 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Remove Watchdog
5 * @ingroup RTEMSScoreWatchdog
6 */
7
8/*
9 * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
10 *
11 *  embedded brains GmbH
12 *  Dornierstr. 4
13 *  82178 Puchheim
14 *  Germany
15 *  <rtems@embedded-brains.de>
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.org/license/LICENSE.
20 */
21
22#if HAVE_CONFIG_H
23#include "config.h"
24#endif
25
26#include <rtems/score/watchdogimpl.h>
27
28void _Watchdog_Remove(
29  Watchdog_Header  *header,
30  Watchdog_Control *the_watchdog
31)
32{
33  if ( _Watchdog_Is_scheduled( the_watchdog ) ) {
34    if ( header->first == &the_watchdog->Node.RBTree ) {
35      _Watchdog_Next_first( header, the_watchdog );
36    }
37
38    _RBTree_Extract( &header->Watchdogs, &the_watchdog->Node.RBTree );
39    _Watchdog_Set_state( the_watchdog, WATCHDOG_INACTIVE );
40  }
41}
Note: See TracBrowser for help on using the repository browser.