From 8bc6bf28aa098a03c25763e3c59274874bfbe3da Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 11 May 2016 13:42:58 +0200 Subject: posix: Avoid Giant lock for some pthread functions Avoid Giant lock for pthread_getattr_np(), pthread_setschedparam() and pthread_getschedparam(). Replace POSIX threads scheduler lock with thread state lock. Update #2555. --- cpukit/posix/include/rtems/posix/pthreadimpl.h | 17 ----------------- cpukit/posix/include/rtems/posix/threadsup.h | 2 -- 2 files changed, 19 deletions(-) (limited to 'cpukit/posix/include') diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h index ef5821e48f..42f10b08bc 100644 --- a/cpukit/posix/include/rtems/posix/pthreadimpl.h +++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h @@ -223,23 +223,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Join_dequeue( ); } -RTEMS_INLINE_ROUTINE void _POSIX_Threads_Scheduler_acquire( - POSIX_API_Control *api, - ISR_lock_Context *lock_context -) -{ - _ISR_lock_ISR_disable_and_acquire( &api->Scheduler_lock, lock_context ); -} - -RTEMS_INLINE_ROUTINE void _POSIX_Threads_Scheduler_release( - POSIX_API_Control *api, - ISR_lock_Context *lock_context -) -{ - _ISR_lock_Release_and_ISR_enable( &api->Scheduler_lock, lock_context ); -} - - /** @} */ #ifdef __cplusplus diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h index 93ba2c1c7c..8109921270 100644 --- a/cpukit/posix/include/rtems/posix/threadsup.h +++ b/cpukit/posix/include/rtems/posix/threadsup.h @@ -52,8 +52,6 @@ typedef struct { /** This is the set of threads waiting for the thread to exit. */ Thread_queue_Control Join_List; /** This is the thread's current scheduling policy. */ - ISR_LOCK_MEMBER( Scheduler_lock ) - /** This is the thread's current scheduling policy. */ int schedpolicy; /** This is the thread's current set of scheduling parameters. */ struct sched_param schedparam; -- cgit v1.2.3