source: rtems/cpukit/score/src/watchdogremove.c @ bbd6d27a

5
Last change on this file since bbd6d27a was 03b900d, checked in by Sebastian Huber <sebastian.huber@…>, on 02/18/16 at 07:36:26

score: Replace watchdog handler implementation

Use a red-black tree instead of delta chains.

Close #2344.
Update #2554.
Update #2555.
Close #2606.

  • Property mode set to 100644
File size: 890 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Remove Watchdog
5 * @ingroup ScoreWatchdog
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.