From 4025a60fcb892169266102a58beef4caad17340c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Apr 2016 17:02:54 +0200 Subject: score: Avoid Giant lock for CORE mtx/sem Avoid Giant lock for CORE mutex and semaphore flush and delete operations. Update #2555. --- cpukit/posix/include/rtems/posix/semaphoreimpl.h | 26 +++--------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'cpukit/posix/include') diff --git a/cpukit/posix/include/rtems/posix/semaphoreimpl.h b/cpukit/posix/include/rtems/posix/semaphoreimpl.h index 41bfdad65a..d726761689 100644 --- a/cpukit/posix/include/rtems/posix/semaphoreimpl.h +++ b/cpukit/posix/include/rtems/posix/semaphoreimpl.h @@ -22,8 +22,7 @@ #include #include #include - -#include +#include #ifdef __cplusplus extern "C" { @@ -61,26 +60,6 @@ RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); } -/** - * @brief POSIX Semaphore Get - * - * This function maps semaphore IDs to semaphore control blocks. - * If ID corresponds to a local semaphore, then it returns - * the_semaphore control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the semaphore ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_semaphore is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_semaphore is undefined. - */ -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( - sem_t *id, - Objects_Locations *location -) -{ - return (POSIX_Semaphore_Control *) - _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location ); -} - RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control * _POSIX_Semaphore_Get_interrupt_disable( sem_t *id, @@ -116,7 +95,8 @@ int _POSIX_Semaphore_Create_support( * This routine supports the sem_close and sem_unlink routines. */ void _POSIX_Semaphore_Delete( - POSIX_Semaphore_Control *the_semaphore + POSIX_Semaphore_Control *the_semaphore, + ISR_lock_Context *lock_context ); /** -- cgit v1.2.3