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/mqueueclose.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpukit/posix/src/mqueueclose.c') diff --git a/cpukit/posix/src/mqueueclose.c b/cpukit/posix/src/mqueueclose.c index 152fc7ec46..72a7cdc40e 100644 --- a/cpukit/posix/src/mqueueclose.c +++ b/cpukit/posix/src/mqueueclose.c @@ -57,6 +57,7 @@ int mq_close( POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; + _Objects_Allocator_lock(); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); if ( location == OBJECTS_LOCAL ) { /* OBJECTS_LOCAL: @@ -79,9 +80,12 @@ int mq_close( _POSIX_Message_queue_Free_fd( the_mq_fd ); _Objects_Put( &the_mq_fd->Object ); + _Objects_Allocator_unlock(); return 0; } + _Objects_Allocator_unlock(); + /* * OBJECTS_REMOTE: * OBJECTS_ERROR: -- cgit v1.2.3