summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 22:03:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 22:03:55 +0000
commit8d0b7d96439c8dcce6e3c1ab7ca732402f92a2c4 (patch)
tree7d9b73603be147f329e071327af47d9c26ac5d19 /c/src/exec/score
parentAdded new synchronization algorithm. (diff)
downloadrtems-8d0b7d96439c8dcce6e3c1ab7ca732402f92a2c4.tar.bz2
Insert mode argument to _Watchdog_Insert removed. Now are watchdog timers
are automatically activated upon insertion.
Diffstat (limited to 'c/src/exec/score')
-rw-r--r--c/src/exec/score/headers/watchdog.h21
-rw-r--r--c/src/exec/score/include/rtems/score/watchdog.h21
-rw-r--r--c/src/exec/score/inline/rtems/score/tod.inl6
-rw-r--r--c/src/exec/score/inline/rtems/score/watchdog.inl16
-rw-r--r--c/src/exec/score/inline/tod.inl6
-rw-r--r--c/src/exec/score/inline/watchdog.inl16
-rw-r--r--c/src/exec/score/src/coretod.c3
-rw-r--r--c/src/exec/score/src/threadq.c6
-rw-r--r--c/src/exec/score/src/tod.c3
-rw-r--r--c/src/exec/score/src/watchdog.c12
10 files changed, 26 insertions, 84 deletions
diff --git a/c/src/exec/score/headers/watchdog.h b/c/src/exec/score/headers/watchdog.h
index de2f332e22..5ac7eee641 100644
--- a/c/src/exec/score/headers/watchdog.h
+++ b/c/src/exec/score/headers/watchdog.h
@@ -49,18 +49,6 @@ typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )(
#define WATCHDOG_NO_TIMEOUT 0
/*
- * The following enumerated type details the modes in which the
- * Watchdog_Insert routine may operate. The watchdog may be
- * activated automatically at insert time or later, explicitly
- * by the caller.
- */
-
-typedef enum {
- WATCHDOG_ACTIVATE_NOW, /* activate watchdog as part of insertion */
- WATCHDOG_NO_ACTIVATE /* watchdog will be explicitly activated */
-} Watchdog_Insert_modes;
-
-/*
* The following enumerated type lists the states in which a
* watchdog timer may be at any given time.
*/
@@ -238,8 +226,7 @@ STATIC INLINE void _Watchdog_Tickle_seconds( void );
STATIC INLINE void _Watchdog_Insert_ticks(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
);
/*
@@ -256,8 +243,7 @@ STATIC INLINE void _Watchdog_Insert_ticks(
STATIC INLINE void _Watchdog_Insert_seconds(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
);
/*
@@ -391,8 +377,7 @@ void _Watchdog_Adjust (
void _Watchdog_Insert (
Chain_Control *header,
- Watchdog_Control *the_watchdog,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Control *the_watchdog
);
/*
diff --git a/c/src/exec/score/include/rtems/score/watchdog.h b/c/src/exec/score/include/rtems/score/watchdog.h
index de2f332e22..5ac7eee641 100644
--- a/c/src/exec/score/include/rtems/score/watchdog.h
+++ b/c/src/exec/score/include/rtems/score/watchdog.h
@@ -49,18 +49,6 @@ typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )(
#define WATCHDOG_NO_TIMEOUT 0
/*
- * The following enumerated type details the modes in which the
- * Watchdog_Insert routine may operate. The watchdog may be
- * activated automatically at insert time or later, explicitly
- * by the caller.
- */
-
-typedef enum {
- WATCHDOG_ACTIVATE_NOW, /* activate watchdog as part of insertion */
- WATCHDOG_NO_ACTIVATE /* watchdog will be explicitly activated */
-} Watchdog_Insert_modes;
-
-/*
* The following enumerated type lists the states in which a
* watchdog timer may be at any given time.
*/
@@ -238,8 +226,7 @@ STATIC INLINE void _Watchdog_Tickle_seconds( void );
STATIC INLINE void _Watchdog_Insert_ticks(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
);
/*
@@ -256,8 +243,7 @@ STATIC INLINE void _Watchdog_Insert_ticks(
STATIC INLINE void _Watchdog_Insert_seconds(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
);
/*
@@ -391,8 +377,7 @@ void _Watchdog_Adjust (
void _Watchdog_Insert (
Chain_Control *header,
- Watchdog_Control *the_watchdog,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Control *the_watchdog
);
/*
diff --git a/c/src/exec/score/inline/rtems/score/tod.inl b/c/src/exec/score/inline/rtems/score/tod.inl
index d2e26e2f2a..dce8aca426 100644
--- a/c/src/exec/score/inline/rtems/score/tod.inl
+++ b/c/src/exec/score/inline/rtems/score/tod.inl
@@ -61,11 +61,7 @@ STATIC INLINE void _TOD_Activate(
Watchdog_Interval ticks
)
{
- _Watchdog_Insert_ticks(
- &_TOD_Seconds_watchdog,
- ticks,
- WATCHDOG_ACTIVATE_NOW
- );
+ _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks );
}
#endif
diff --git a/c/src/exec/score/inline/rtems/score/watchdog.inl b/c/src/exec/score/inline/rtems/score/watchdog.inl
index bb7edb82ed..ae3717e102 100644
--- a/c/src/exec/score/inline/rtems/score/watchdog.inl
+++ b/c/src/exec/score/inline/rtems/score/watchdog.inl
@@ -115,14 +115,13 @@ STATIC INLINE void _Watchdog_Tickle_seconds( void )
STATIC INLINE void _Watchdog_Insert_ticks(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
)
{
the_watchdog->initial = units;
- _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog, insert_mode );
+ _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
}
@@ -134,14 +133,13 @@ STATIC INLINE void _Watchdog_Insert_ticks(
STATIC INLINE void _Watchdog_Insert_seconds(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
)
{
the_watchdog->initial = units;
- _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog, insert_mode );
+ _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
}
@@ -190,11 +188,7 @@ STATIC INLINE void _Watchdog_Reset(
(void) _Watchdog_Remove( the_watchdog );
- _Watchdog_Insert(
- &_Watchdog_Ticks_chain,
- the_watchdog,
- WATCHDOG_ACTIVATE_NOW
- );
+ _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
}
diff --git a/c/src/exec/score/inline/tod.inl b/c/src/exec/score/inline/tod.inl
index d2e26e2f2a..dce8aca426 100644
--- a/c/src/exec/score/inline/tod.inl
+++ b/c/src/exec/score/inline/tod.inl
@@ -61,11 +61,7 @@ STATIC INLINE void _TOD_Activate(
Watchdog_Interval ticks
)
{
- _Watchdog_Insert_ticks(
- &_TOD_Seconds_watchdog,
- ticks,
- WATCHDOG_ACTIVATE_NOW
- );
+ _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks );
}
#endif
diff --git a/c/src/exec/score/inline/watchdog.inl b/c/src/exec/score/inline/watchdog.inl
index bb7edb82ed..ae3717e102 100644
--- a/c/src/exec/score/inline/watchdog.inl
+++ b/c/src/exec/score/inline/watchdog.inl
@@ -115,14 +115,13 @@ STATIC INLINE void _Watchdog_Tickle_seconds( void )
STATIC INLINE void _Watchdog_Insert_ticks(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
)
{
the_watchdog->initial = units;
- _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog, insert_mode );
+ _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
}
@@ -134,14 +133,13 @@ STATIC INLINE void _Watchdog_Insert_ticks(
STATIC INLINE void _Watchdog_Insert_seconds(
Watchdog_Control *the_watchdog,
- Watchdog_Interval units,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Interval units
)
{
the_watchdog->initial = units;
- _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog, insert_mode );
+ _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
}
@@ -190,11 +188,7 @@ STATIC INLINE void _Watchdog_Reset(
(void) _Watchdog_Remove( the_watchdog );
- _Watchdog_Insert(
- &_Watchdog_Ticks_chain,
- the_watchdog,
- WATCHDOG_ACTIVATE_NOW
- );
+ _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
}
diff --git a/c/src/exec/score/src/coretod.c b/c/src/exec/score/src/coretod.c
index 06f30654cc..1a11034ceb 100644
--- a/c/src/exec/score/src/coretod.c
+++ b/c/src/exec/score/src/coretod.c
@@ -231,6 +231,5 @@ void _TOD_Tickle(
}
_Watchdog_Tickle_seconds();
- _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second,
- WATCHDOG_ACTIVATE_NOW );
+ _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second );
}
diff --git a/c/src/exec/score/src/threadq.c b/c/src/exec/score/src/threadq.c
index 87e7903df4..f388959268 100644
--- a/c/src/exec/score/src/threadq.c
+++ b/c/src/exec/score/src/threadq.c
@@ -109,11 +109,7 @@ void _Thread_queue_Enqueue(
NULL
);
- _Watchdog_Insert_ticks(
- &the_thread->Timer,
- timeout,
- WATCHDOG_ACTIVATE_NOW
- );
+ _Watchdog_Insert_ticks( &the_thread->Timer, timeout );
}
switch( the_thread_queue->discipline ) {
diff --git a/c/src/exec/score/src/tod.c b/c/src/exec/score/src/tod.c
index 06f30654cc..1a11034ceb 100644
--- a/c/src/exec/score/src/tod.c
+++ b/c/src/exec/score/src/tod.c
@@ -231,6 +231,5 @@ void _TOD_Tickle(
}
_Watchdog_Tickle_seconds();
- _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second,
- WATCHDOG_ACTIVATE_NOW );
+ _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second );
}
diff --git a/c/src/exec/score/src/watchdog.c b/c/src/exec/score/src/watchdog.c
index b7963f5408..0f72bd3d5c 100644
--- a/c/src/exec/score/src/watchdog.c
+++ b/c/src/exec/score/src/watchdog.c
@@ -140,8 +140,7 @@ void _Watchdog_Adjust(
void _Watchdog_Insert(
Chain_Control *header,
- Watchdog_Control *the_watchdog,
- Watchdog_Insert_modes insert_mode
+ Watchdog_Control *the_watchdog
)
{
ISR_Level level;
@@ -174,10 +173,10 @@ restart:
delta_interval -= after->delta_interval;
/*
- * If you experience problems comment out the _ISR_Flash line. This
- * (3.2.0) is the first release with this critical section redesigned.
+ * If you experience problems comment out the _ISR_Flash line.
+ * 3.2.0 was the first release with this critical section redesigned.
* Under certain circumstances, the PREVIOUS critical section algorithm
- * used around this flash point allows interrupts to execute
+ * used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
@@ -195,8 +194,7 @@ restart:
}
}
- if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
- _Watchdog_Activate( the_watchdog );
+ _Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;