summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/watchdogadjust.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-15 16:28:42 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:42 +0200
commit6d2539413bcc0be45b6fb40e93b4012a1d91b58f (patch)
tree57df90da33bc49a78095c95f286d8824bf940b2e /cpukit/score/src/watchdogadjust.c
parentscore: Add header to _Watchdog_Remove() (diff)
downloadrtems-6d2539413bcc0be45b6fb40e93b4012a1d91b58f.tar.bz2
score: Add _Watchdog_Acquire|Release|Flash()
Update #2307.
Diffstat (limited to 'cpukit/score/src/watchdogadjust.c')
-rw-r--r--cpukit/score/src/watchdogadjust.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpukit/score/src/watchdogadjust.c b/cpukit/score/src/watchdogadjust.c
index 687f063482..04fc1a55a7 100644
--- a/cpukit/score/src/watchdogadjust.c
+++ b/cpukit/score/src/watchdogadjust.c
@@ -27,15 +27,15 @@ void _Watchdog_Adjust_backward(
Watchdog_Interval units
)
{
- ISR_Level level;
+ ISR_lock_Context lock_context;
- _ISR_Disable( level );
+ _Watchdog_Acquire( header, &lock_context );
if ( !_Watchdog_Is_empty( header ) ) {
_Watchdog_First( header )->delta_interval += units;
}
- _ISR_Enable( level );
+ _Watchdog_Release( header, &lock_context );
}
void _Watchdog_Adjust_forward(
@@ -43,9 +43,9 @@ void _Watchdog_Adjust_forward(
Watchdog_Interval units
)
{
- ISR_Level level;
+ ISR_lock_Context lock_context;
- _ISR_Disable( level );
+ _Watchdog_Acquire( header, &lock_context );
while ( !_Watchdog_Is_empty( header ) && units > 0 ) {
Watchdog_Control *first = _Watchdog_First( header );
@@ -57,13 +57,13 @@ void _Watchdog_Adjust_forward(
units -= first->delta_interval;
first->delta_interval = 1;
- _ISR_Enable( level );
+ _Watchdog_Release( header, &lock_context );
_Watchdog_Tickle( header );
- _ISR_Disable( level );
+ _Watchdog_Acquire( header, &lock_context );
}
}
- _ISR_Enable( level );
+ _Watchdog_Release( header, &lock_context );
}