summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/timercreate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-15 10:53:29 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:43 +0200
commit1ccbd052910ed16131c74b0d5595c8a94066942d (patch)
treea0c675b888d112efe455165bde2d9f0803392d3f /cpukit/rtems/src/timercreate.c
parentscore: Add _Watchdog_Acquire|Release|Flash() (diff)
downloadrtems-1ccbd052910ed16131c74b0d5595c8a94066942d.tar.bz2
score: Add Watchdog_Iterator
Rewrite the _Watchdog_Insert(), _Watchdog_Remove() and _Watchdog_Tickle() functions to use iterator items to synchronize concurrent operations. This makes it possible to get rid of the global variables _Watchdog_Sync_level and _Watchdog_Sync_count which are a blocking point for scalable SMP solutions. Update #2307.
Diffstat (limited to 'cpukit/rtems/src/timercreate.c')
-rw-r--r--cpukit/rtems/src/timercreate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c
index 2c6d251b8a..13a01feda9 100644
--- a/cpukit/rtems/src/timercreate.c
+++ b/cpukit/rtems/src/timercreate.c
@@ -29,6 +29,10 @@
void _Timer_Cancel( Timer_Control *the_timer )
{
Timer_server_Control *timer_server;
+ ISR_Level level;
+
+ /* The timer class must not change during the cancel operation */
+ _ISR_Disable( level );
switch ( the_timer->the_class ) {
case TIMER_INTERVAL:
@@ -46,6 +50,8 @@ void _Timer_Cancel( Timer_Control *the_timer )
_Assert( the_timer->the_class == TIMER_DORMANT );
break;
}
+
+ _ISR_Enable( level );
}
rtems_status_code rtems_timer_create(