summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src/extensiondelete.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-27 14:16:12 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-31 08:29:44 +0200
commit23fec9f0e18dc4913fab818118f836af150b98f3 (patch)
tree66228f23bbf654117a33e28db7a017eea21fb785 /cpukit/sapi/src/extensiondelete.c
parentscore: Use thread life protection for API mutexes (diff)
downloadrtems-23fec9f0e18dc4913fab818118f836af150b98f3.tar.bz2
score: PR2152: Use allocator mutex for objects
Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
Diffstat (limited to 'cpukit/sapi/src/extensiondelete.c')
-rw-r--r--cpukit/sapi/src/extensiondelete.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/sapi/src/extensiondelete.c b/cpukit/sapi/src/extensiondelete.c
index 0eaaffd103..f851ea06c2 100644
--- a/cpukit/sapi/src/extensiondelete.c
+++ b/cpukit/sapi/src/extensiondelete.c
@@ -30,13 +30,15 @@ rtems_status_code rtems_extension_delete(
Extension_Control *the_extension;
Objects_Locations location;
+ _Objects_Allocator_lock();
the_extension = _Extension_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
_Objects_Close( &_Extension_Information, &the_extension->Object );
- _Extension_Free( the_extension );
_Objects_Put( &the_extension->Object );
+ _Extension_Free( the_extension );
+ _Objects_Allocator_unlock();
return RTEMS_SUCCESSFUL;
#if defined(RTEMS_MULTIPROCESSING)
@@ -46,5 +48,7 @@ rtems_status_code rtems_extension_delete(
break;
}
+ _Objects_Allocator_unlock();
+
return RTEMS_INVALID_ID;
}