summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 10:01:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:45 +0200
commit02c4c441a51b43b55608893efa4a80a62bb9d4d5 (patch)
tree709655b1c53afc3ff981890989a5290d1c400ad2 /cpukit/posix/include/rtems/posix
parentscore: Generalize _Event_Timeout() (diff)
downloadrtems-02c4c441a51b43b55608893efa4a80a62bb9d4d5.tar.bz2
score: Add Thread_queue_Control::Lock
Move the complete thread queue enqueue procedure into _Thread_queue_Enqueue_critical(). It is possible to use the thread queue lock to protect state of the object embedding the thread queue. This enables per object fine grained locking in the future. Delete _Thread_queue_Enter_critical_section(). Update #2273.
Diffstat (limited to '')
-rw-r--r--cpukit/posix/include/rtems/posix/barrierimpl.h1
-rw-r--r--cpukit/posix/include/rtems/posix/condimpl.h2
-rw-r--r--cpukit/posix/include/rtems/posix/muteximpl.h1
-rw-r--r--cpukit/posix/include/rtems/posix/psignalimpl.h8
-rw-r--r--cpukit/posix/include/rtems/posix/rwlockimpl.h1
-rw-r--r--cpukit/posix/include/rtems/posix/semaphoreimpl.h1
6 files changed, 9 insertions, 5 deletions
diff --git a/cpukit/posix/include/rtems/posix/barrierimpl.h b/cpukit/posix/include/rtems/posix/barrierimpl.h
index 240abad45d..22be1c0d6e 100644
--- a/cpukit/posix/include/rtems/posix/barrierimpl.h
+++ b/cpukit/posix/include/rtems/posix/barrierimpl.h
@@ -80,6 +80,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free (
POSIX_Barrier_Control *the_barrier
)
{
+ _CORE_barrier_Destroy( &the_barrier->Barrier );
_Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object );
}
diff --git a/cpukit/posix/include/rtems/posix/condimpl.h b/cpukit/posix/include/rtems/posix/condimpl.h
index 435127ee3c..7def0f852a 100644
--- a/cpukit/posix/include/rtems/posix/condimpl.h
+++ b/cpukit/posix/include/rtems/posix/condimpl.h
@@ -19,6 +19,7 @@
#include <rtems/posix/cond.h>
#include <rtems/score/objectimpl.h>
+#include <rtems/score/threadqimpl.h>
#include <rtems/score/watchdog.h>
#ifdef __cplusplus
@@ -72,6 +73,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
+ _Thread_queue_Destroy( &the_condition_variable->Wait_queue );
_Objects_Free(
&_POSIX_Condition_variables_Information,
&the_condition_variable->Object
diff --git a/cpukit/posix/include/rtems/posix/muteximpl.h b/cpukit/posix/include/rtems/posix/muteximpl.h
index 821961c0f4..f4c6c686aa 100644
--- a/cpukit/posix/include/rtems/posix/muteximpl.h
+++ b/cpukit/posix/include/rtems/posix/muteximpl.h
@@ -72,6 +72,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free(
POSIX_Mutex_Control *the_mutex
)
{
+ _CORE_mutex_Destroy( &the_mutex->Mutex );
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
}
diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h
index 81561e2539..166705b37b 100644
--- a/cpukit/posix/include/rtems/posix/psignalimpl.h
+++ b/cpukit/posix/include/rtems/posix/psignalimpl.h
@@ -33,7 +33,7 @@
#include <rtems/posix/sigset.h>
#include <rtems/score/apiext.h>
#include <rtems/score/isrlock.h>
-#include <rtems/score/threadq.h>
+#include <rtems/score/threadqimpl.h>
#define _States_Is_interruptible_signal( _states ) \
( ((_states) & \
@@ -55,8 +55,6 @@
* Variables
*/
-extern ISR_lock_Control _POSIX_signals_Lock;
-
extern sigset_t _POSIX_signals_Pending;
extern const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
@@ -79,10 +77,10 @@ extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
void _POSIX_signals_Manager_Initialization(void);
#define _POSIX_signals_Acquire( lock_context ) \
- _ISR_lock_ISR_disable_and_acquire( &_POSIX_signals_Lock, lock_context )
+ _Thread_queue_Acquire( &_POSIX_signals_Wait_queue, lock_context )
#define _POSIX_signals_Release( lock_context ) \
- _ISR_lock_Release_and_ISR_enable( &_POSIX_signals_Lock, lock_context )
+ _Thread_queue_Release( &_POSIX_signals_Wait_queue, lock_context )
void _POSIX_signals_Action_handler(
Thread_Control *executing,
diff --git a/cpukit/posix/include/rtems/posix/rwlockimpl.h b/cpukit/posix/include/rtems/posix/rwlockimpl.h
index 48e0a17366..46e33904dc 100644
--- a/cpukit/posix/include/rtems/posix/rwlockimpl.h
+++ b/cpukit/posix/include/rtems/posix/rwlockimpl.h
@@ -89,6 +89,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
+ _CORE_RWLock_Destroy( &the_RWLock->RWLock );
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
}
diff --git a/cpukit/posix/include/rtems/posix/semaphoreimpl.h b/cpukit/posix/include/rtems/posix/semaphoreimpl.h
index df5e5238de..783289aa44 100644
--- a/cpukit/posix/include/rtems/posix/semaphoreimpl.h
+++ b/cpukit/posix/include/rtems/posix/semaphoreimpl.h
@@ -65,6 +65,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
+ _CORE_semaphore_Destroy( &the_semaphore->Semaphore );
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
}