diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-18 08:36:26 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-04 13:36:10 +0100 |
commit | 03b900d3ed120ea919ea3eded7edbece3488cff3 (patch) | |
tree | 182781fc14fe15fd67caeb80e46f1c58495839c2 /cpukit/rtems/src/timergetinfo.c | |
parent | score: Distribute clock tick to all online CPUs (diff) | |
download | rtems-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/rtems/src/timergetinfo.c')
-rw-r--r-- | cpukit/rtems/src/timergetinfo.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cpukit/rtems/src/timergetinfo.c b/cpukit/rtems/src/timergetinfo.c index 17c32e6cf4..a11861c63e 100644 --- a/cpukit/rtems/src/timergetinfo.c +++ b/cpukit/rtems/src/timergetinfo.c @@ -32,19 +32,22 @@ rtems_status_code rtems_timer_get_information( { Timer_Control *the_timer; Objects_Locations location; + ISR_lock_Context lock_context; + Per_CPU_Control *cpu; if ( !the_info ) return RTEMS_INVALID_ADDRESS; - the_timer = _Timer_Get( id, &location ); + the_timer = _Timer_Get( id, &location, &lock_context ); switch ( location ) { case OBJECTS_LOCAL: + cpu = _Timer_Acquire_critical( the_timer, &lock_context ); the_info->the_class = the_timer->the_class; - the_info->initial = the_timer->Ticker.initial; - the_info->start_time = the_timer->Ticker.start_time; - the_info->stop_time = the_timer->Ticker.stop_time; - _Objects_Put( &the_timer->Object ); + the_info->initial = the_timer->initial; + the_info->start_time = the_timer->start_time; + the_info->stop_time = the_timer->stop_time; + _Timer_Release( cpu, &lock_context ); return RTEMS_SUCCESSFUL; #if defined(RTEMS_MULTIPROCESSING) |