summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/timergetoverrun.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-18 08:36:26 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-04 13:36:10 +0100
commit03b900d3ed120ea919ea3eded7edbece3488cff3 (patch)
tree182781fc14fe15fd67caeb80e46f1c58495839c2 /cpukit/posix/src/timergetoverrun.c
parentscore: Distribute clock tick to all online CPUs (diff)
downloadrtems-03b900d3ed120ea919ea3eded7edbece3488cff3.tar.bz2
score: Replace watchdog handler implementation
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
Diffstat (limited to 'cpukit/posix/src/timergetoverrun.c')
-rw-r--r--cpukit/posix/src/timergetoverrun.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/posix/src/timergetoverrun.c b/cpukit/posix/src/timergetoverrun.c
index dd7669ee89..0a28fa7b5f 100644
--- a/cpukit/posix/src/timergetoverrun.c
+++ b/cpukit/posix/src/timergetoverrun.c
@@ -33,14 +33,17 @@ int timer_getoverrun(
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
+ ISR_lock_Context lock_context;
+ Per_CPU_Control *cpu;
- ptimer = _POSIX_Timer_Get( timerid, &location );
+ ptimer = _POSIX_Timer_Get( timerid, &location, &lock_context );
switch ( location ) {
case OBJECTS_LOCAL:
+ cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context );
overrun = ptimer->overrun;
ptimer->overrun = 0;
- _Objects_Put( &ptimer->Object );
+ _POSIX_Timer_Release( cpu, &lock_context );
return overrun;
#if defined(RTEMS_MULTIPROCESSING)