diff options
Diffstat (limited to 'cpukit/rtems/src/timerdelete.c')
-rw-r--r-- | cpukit/rtems/src/timerdelete.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/rtems/src/timerdelete.c b/cpukit/rtems/src/timerdelete.c index a3cf52a978..19232c8096 100644 --- a/cpukit/rtems/src/timerdelete.c +++ b/cpukit/rtems/src/timerdelete.c @@ -32,14 +32,16 @@ rtems_status_code rtems_timer_delete( Timer_Control *the_timer; Objects_Locations location; + _Objects_Allocator_lock(); the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); - _Timer_Free( the_timer ); _Objects_Put( &the_timer->Object ); + _Timer_Free( the_timer ); + _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; #if defined(RTEMS_MULTIPROCESSING) @@ -49,5 +51,7 @@ rtems_status_code rtems_timer_delete( break; } + _Objects_Allocator_unlock(); + return RTEMS_INVALID_ID; } |