[rtems commit] score: Delete unused state WATCHDOG_REMOVE_IT

Sebastian Huber sebh at rtems.org
Sat Jun 13 14:46:34 UTC 2015


Module:    rtems
Branch:    master
Commit:    258d580c42a0bc89c2028fb1ff6a4a97792bdcaa
Changeset: http://git.rtems.org/rtems/commit/?id=258d580c42a0bc89c2028fb1ff6a4a97792bdcaa

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Sat Jun 13 14:49:23 2015 +0200

score: Delete unused state WATCHDOG_REMOVE_IT

---

 cpukit/posix/src/alarm.c                        |  2 +-
 cpukit/posix/src/ualarm.c                       |  2 +-
 cpukit/score/include/rtems/score/watchdog.h     |  6 +-----
 cpukit/score/include/rtems/score/watchdogimpl.h | 14 --------------
 cpukit/score/src/watchdogremove.c               |  6 +-----
 5 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index 6f051d7..7045a9c 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -74,7 +74,7 @@ unsigned int alarm(
   _Thread_Disable_dispatch();
 
   state = _Watchdog_Remove_seconds( the_timer );
-  if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
+  if ( state == WATCHDOG_ACTIVE ) {
     /*
      *  The stop_time and start_time fields are snapshots of ticks since
      *  boot.  Since alarm() is dealing in seconds, we must account for
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index 9235ef1..dc271b4 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -73,7 +73,7 @@ useconds_t ualarm(
   _Thread_Disable_dispatch();
 
   state = _Watchdog_Remove_ticks( the_timer );
-  if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
+  if ( state == WATCHDOG_ACTIVE ) {
     /*
      *  The stop_time and start_time fields are snapshots of ticks since
      *  boot.  Since alarm() is dealing in seconds, we must account for
diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h
index ff6c823..bad7269 100644
--- a/cpukit/score/include/rtems/score/watchdog.h
+++ b/cpukit/score/include/rtems/score/watchdog.h
@@ -86,11 +86,7 @@ typedef enum {
    */
   WATCHDOG_BEING_INSERTED,
   /** This is the state when the watchdog is on a chain, and allowed to fire. */
-  WATCHDOG_ACTIVE,
-  /** This is the state when the watchdog is on a chain, but we should
-   *  remove without firing if it expires.
-   */
-  WATCHDOG_REMOVE_IT
+  WATCHDOG_ACTIVE
 } Watchdog_States;
 
 /**
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index 8405232..ad6ab5b 100644
--- a/cpukit/score/include/rtems/score/watchdogimpl.h
+++ b/cpukit/score/include/rtems/score/watchdogimpl.h
@@ -317,20 +317,6 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
 }
 
 /**
- * This routine deactivates THE_WATCHDOG timer which will remain
- * on a watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
-  Watchdog_Control *the_watchdog
-)
-{
-
-  the_watchdog->state = WATCHDOG_REMOVE_IT;
-
-}
-
-/**
  * This routine is invoked at each clock tick to update the ticks
  * watchdog chain.
  */
diff --git a/cpukit/score/src/watchdogremove.c b/cpukit/score/src/watchdogremove.c
index 2ac63fe..03c0c5f 100644
--- a/cpukit/score/src/watchdogremove.c
+++ b/cpukit/score/src/watchdogremove.c
@@ -31,10 +31,7 @@ static void _Watchdog_Remove_it(
   const Chain_Node  *iterator_tail;
   Chain_Node        *iterator_node;
 
-  _Assert(
-    the_watchdog->state == WATCHDOG_ACTIVE
-      || the_watchdog->state == WATCHDOG_REMOVE_IT
-  );
+  _Assert( the_watchdog->state == WATCHDOG_ACTIVE );
 
   the_watchdog->state = WATCHDOG_INACTIVE;
   the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
@@ -99,7 +96,6 @@ Watchdog_States _Watchdog_Remove(
       break;
 
     case WATCHDOG_ACTIVE:
-    case WATCHDOG_REMOVE_IT:
       _Watchdog_Remove_it( header, the_watchdog );
       break;
   }




More information about the vc mailing list