From 5c491aef41558df022032b543d826ef4e49493b5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 20 Dec 1995 15:39:19 +0000 Subject: changes remerged after lost in disk crash -- recovered from snapshot, partially recovered working tree, etc --- c/src/exec/score/macros/rtems/score/tod.inl | 5 ++--- c/src/exec/score/macros/rtems/score/tqdata.inl | 12 ++++++++++++ c/src/exec/score/macros/rtems/score/watchdog.inl | 21 +++++++++------------ c/src/exec/score/macros/tod.inl | 5 ++--- c/src/exec/score/macros/tqdata.inl | 12 ++++++++++++ c/src/exec/score/macros/watchdog.inl | 21 +++++++++------------ 6 files changed, 46 insertions(+), 30 deletions(-) (limited to 'c/src/exec/score/macros') diff --git a/c/src/exec/score/macros/rtems/score/tod.inl b/c/src/exec/score/macros/rtems/score/tod.inl index 9360a588b1..ecab4e6eae 100644 --- a/c/src/exec/score/macros/rtems/score/tod.inl +++ b/c/src/exec/score/macros/rtems/score/tod.inl @@ -51,9 +51,8 @@ * */ -#define _TOD_Activate( ticks ) \ - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, \ - (ticks), WATCHDOG_ACTIVATE_NOW ) +#define _TOD_Activate( _ticks ) \ + _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) ) #endif /* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/tqdata.inl b/c/src/exec/score/macros/rtems/score/tqdata.inl index c0d7ee8e5e..1df3cd5270 100644 --- a/c/src/exec/score/macros/rtems/score/tqdata.inl +++ b/c/src/exec/score/macros/rtems/score/tqdata.inl @@ -44,5 +44,17 @@ #define _Thread_queue_Get_number_waiting( _the_thread_queue ) \ ( (_the_thread_queue)->count ) +/*PAGE + * + * _Thread_queue_Enter_critical_section + * + */ + +#define _Thread_queue_Enter_critical_section( _the_thread_queue ) \ + do { \ + (_the_thread_queue)->sync = TRUE; \ + (_the_thread_queue)->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; \ + } while ( 0 ) + #endif /* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/watchdog.inl b/c/src/exec/score/macros/rtems/score/watchdog.inl index a8a061b144..d24224f93d 100644 --- a/c/src/exec/score/macros/rtems/score/watchdog.inl +++ b/c/src/exec/score/macros/rtems/score/watchdog.inl @@ -84,12 +84,11 @@ * */ -#define _Watchdog_Insert_ticks( _the_watchdog, _units, _insert_mode ) \ - { \ +#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \ + do { \ (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, \ - (_the_watchdog), (_insert_mode) ); \ - } + _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ + } while ( 0 ) /*PAGE * @@ -97,12 +96,11 @@ * */ -#define _Watchdog_Insert_seconds( _the_watchdog, _units, _insert_mode ) \ - { \ +#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \ + do { \ (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Seconds_chain, \ - (_the_watchdog), (_insert_mode) ); \ - } + _Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \ + } while ( 0 ) /*PAGE * @@ -131,8 +129,7 @@ #define _Watchdog_Reset( _the_watchdog ) \ { \ (void) _Watchdog_Remove( (_the_watchdog) ); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, \ - (_the_watchdog), WATCHDOG_ACTIVATE_NOW ); \ + _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ } /*PAGE diff --git a/c/src/exec/score/macros/tod.inl b/c/src/exec/score/macros/tod.inl index 9360a588b1..ecab4e6eae 100644 --- a/c/src/exec/score/macros/tod.inl +++ b/c/src/exec/score/macros/tod.inl @@ -51,9 +51,8 @@ * */ -#define _TOD_Activate( ticks ) \ - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, \ - (ticks), WATCHDOG_ACTIVATE_NOW ) +#define _TOD_Activate( _ticks ) \ + _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) ) #endif /* end of include file */ diff --git a/c/src/exec/score/macros/tqdata.inl b/c/src/exec/score/macros/tqdata.inl index c0d7ee8e5e..1df3cd5270 100644 --- a/c/src/exec/score/macros/tqdata.inl +++ b/c/src/exec/score/macros/tqdata.inl @@ -44,5 +44,17 @@ #define _Thread_queue_Get_number_waiting( _the_thread_queue ) \ ( (_the_thread_queue)->count ) +/*PAGE + * + * _Thread_queue_Enter_critical_section + * + */ + +#define _Thread_queue_Enter_critical_section( _the_thread_queue ) \ + do { \ + (_the_thread_queue)->sync = TRUE; \ + (_the_thread_queue)->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; \ + } while ( 0 ) + #endif /* end of include file */ diff --git a/c/src/exec/score/macros/watchdog.inl b/c/src/exec/score/macros/watchdog.inl index a8a061b144..d24224f93d 100644 --- a/c/src/exec/score/macros/watchdog.inl +++ b/c/src/exec/score/macros/watchdog.inl @@ -84,12 +84,11 @@ * */ -#define _Watchdog_Insert_ticks( _the_watchdog, _units, _insert_mode ) \ - { \ +#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \ + do { \ (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, \ - (_the_watchdog), (_insert_mode) ); \ - } + _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ + } while ( 0 ) /*PAGE * @@ -97,12 +96,11 @@ * */ -#define _Watchdog_Insert_seconds( _the_watchdog, _units, _insert_mode ) \ - { \ +#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \ + do { \ (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Seconds_chain, \ - (_the_watchdog), (_insert_mode) ); \ - } + _Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \ + } while ( 0 ) /*PAGE * @@ -131,8 +129,7 @@ #define _Watchdog_Reset( _the_watchdog ) \ { \ (void) _Watchdog_Remove( (_the_watchdog) ); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, \ - (_the_watchdog), WATCHDOG_ACTIVATE_NOW ); \ + _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ } /*PAGE -- cgit v1.2.3