From 23fec9f0e18dc4913fab818118f836af150b98f3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 27 Mar 2014 14:16:12 +0100 Subject: 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. --- cpukit/posix/src/keydelete.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpukit/posix/src/keydelete.c') diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c index cd2b39802d..392558f0f8 100644 --- a/cpukit/posix/src/keydelete.c +++ b/cpukit/posix/src/keydelete.c @@ -38,6 +38,7 @@ int pthread_key_delete( POSIX_Keys_Control *the_key; Objects_Locations location; + _Objects_Allocator_lock(); the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { @@ -50,6 +51,7 @@ int pthread_key_delete( */ _POSIX_Keys_Free( the_key ); _Objects_Put(&the_key->Object); + _Objects_Allocator_unlock(); return 0; #if defined(RTEMS_MULTIPROCESSING) @@ -59,5 +61,7 @@ int pthread_key_delete( break; } + _Objects_Allocator_unlock(); + return EINVAL; } -- cgit v1.2.3