diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-20 09:50:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-21 08:25:32 +0200 |
commit | d3802bb5d708d01d03774b6758ed1e87484b8fac (patch) | |
tree | 40ff15dcafece4b9e5a72eb9706831d44ab2c5dc /cpukit/score/src | |
parent | score: Add _Thread_Get_interrupt_disable() (diff) | |
download | rtems-d3802bb5d708d01d03774b6758ed1e87484b8fac.tar.bz2 |
score: Delete object control block ISR lock
The Objects_Control::Lock was a software layer violation. It worked
only for the threads since they are somewhat special.
Update #2273.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/objectacquire.c | 80 | ||||
-rw-r--r-- | cpukit/score/src/objectclose.c | 2 |
2 files changed, 0 insertions, 82 deletions
diff --git a/cpukit/score/src/objectacquire.c b/cpukit/score/src/objectacquire.c deleted file mode 100644 index 57d38f47bd..0000000000 --- a/cpukit/score/src/objectacquire.c +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file - * - * @brief Object Acquire - * - * @ingroup ScoreObject - */ - -/* - * Copyright (c) 2015 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H - #include "config.h" -#endif - -#include <rtems/score/objectimpl.h> - -Objects_Control *_Objects_Acquire( - const Objects_Information *information, - Objects_Id id, - Objects_Locations *location, - ISR_lock_Context *lock_context -) -{ - Objects_Control *the_object; - uint32_t index; - - index = id - information->minimum_id + 1; - - if ( information->maximum >= index ) { - /* - * On uni-processor configurations we disable interrupts before we use the - * local table. This prevents use of freed memory in case the object - * information is extended in between. On SMP configurations bad things - * can happen, see https://devel.rtems.org/ticket/2280. - */ -#if !defined(RTEMS_SMP) - ISR_Level level; - - _ISR_Disable( level ); -#endif - if ( ( the_object = information->local_table[ index ] ) != NULL ) { - *location = OBJECTS_LOCAL; -#if defined(RTEMS_SMP) - _ISR_lock_ISR_disable_and_acquire( &the_object->Lock, lock_context ); -#else - lock_context->isr_level = level; -#endif - - return the_object; - } -#if !defined(RTEMS_SMP) - _ISR_Enable( level ); -#endif - *location = OBJECTS_ERROR; - - return NULL; - } - - *location = OBJECTS_ERROR; - -#if defined(RTEMS_MULTIPROCESSING) - _Objects_MP_Is_remote( information, id, location, &the_object ); - - return the_object; -#else - return NULL; -#endif -} diff --git a/cpukit/score/src/objectclose.c b/cpukit/score/src/objectclose.c index 25c7aa1a36..52eb10c60b 100644 --- a/cpukit/score/src/objectclose.c +++ b/cpukit/score/src/objectclose.c @@ -28,6 +28,4 @@ void _Objects_Close( _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); - - _ISR_lock_Destroy( &the_object->Lock ); } |