From 33829ce155069462ba410d396da431386369ed08 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 13 May 2016 14:07:23 +0200 Subject: score: Avoid Giant lock for _Thread_Start() Update #2555. --- cpukit/posix/src/pthreadcreate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index 1fe3fe4465..33fae37776 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -229,12 +229,11 @@ int pthread_create( api->schedpolicy = schedpolicy; api->schedparam = schedparam; - _Thread_Disable_dispatch(); - /* * POSIX threads are allocated and started in one operation. */ - status = _Thread_Start( the_thread, &entry ); + _ISR_lock_ISR_disable( &lock_context ); + status = _Thread_Start( the_thread, &entry, &lock_context ); #if defined(RTEMS_DEBUG) /* @@ -244,7 +243,6 @@ int pthread_create( * thread while we are creating it. */ if ( !status ) { - _Thread_Enable_dispatch(); _POSIX_Threads_Free( the_thread ); _Objects_Allocator_unlock(); return EINVAL; @@ -261,8 +259,6 @@ int pthread_create( _ISR_lock_ISR_enable( &lock_context ); } - _Thread_Enable_dispatch(); - /* * Return the id and indicate we successfully created the thread */ -- cgit v1.2.3