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/condinit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cpukit/posix/src/condinit.c') diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c index a69bc8cfdc..81575f2b17 100644 --- a/cpukit/posix/src/condinit.c +++ b/cpukit/posix/src/condinit.c @@ -51,12 +51,10 @@ int pthread_cond_init( if ( !the_attr->is_initialized ) return EINVAL; - _Thread_Disable_dispatch(); - the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { - _Thread_Enable_dispatch(); + _Objects_Allocator_unlock(); return ENOMEM; } @@ -79,7 +77,7 @@ int pthread_cond_init( *cond = the_cond->Object.id; - _Thread_Enable_dispatch(); + _Objects_Allocator_unlock(); return 0; } -- cgit v1.2.3