summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-05 14:36:30 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-06 09:08:20 +0200
commit97312fcc6da163d76b69bf8ce68fd791cf014c2a (patch)
tree6599b770a1587356b02b92b4003489f2e9bf8bc5 /cpukit/posix/src
parentbsp/atsam: Fix mbuf allocation (diff)
downloadrtems-97312fcc6da163d76b69bf8ce68fd791cf014c2a.tar.bz2
score: Delete Thread_Wait_information::id
This field was only by the monitor in non-multiprocessing configurations. Add new field Thread_Wait_information::remote_id in multiprocessing configurations and use it for the remote procedure call thread queue. Add _Thread_Wait_get_id() to obtain the object identifier for debug and system information tools. Ensure the object layout via static asserts. Add test cases to sptests/spthreadq01.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r--cpukit/posix/src/condwaitsupp.c7
-rw-r--r--cpukit/posix/src/mqueuerecvsupp.c6
-rw-r--r--cpukit/posix/src/mutexlocksupp.c3
-rw-r--r--cpukit/posix/src/pbarrierwait.c4
-rw-r--r--cpukit/posix/src/prwlockwrlock.c4
-rw-r--r--cpukit/posix/src/semaphorewaitsupp.c6
6 files changed, 27 insertions, 3 deletions
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index d4e2403058..0a7e30850d 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -24,9 +24,15 @@
#include <rtems/system.h>
#include <rtems/score/watchdog.h>
#include <rtems/score/statesimpl.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/posix/condimpl.h>
#include <rtems/posix/muteximpl.h>
+THREAD_WAIT_QUEUE_OBJECT_ASSERT(
+ POSIX_Condition_variables_Control,
+ Wait_queue
+);
+
int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
@@ -75,7 +81,6 @@ int _POSIX_Condition_variables_Wait_support(
executing = _Thread_Executing;
executing->Wait.return_code = 0;
- executing->Wait.id = *cond;
_Thread_queue_Enqueue(
&the_cond->Wait_queue,
diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c
index 54d0ac1d7f..bbbc23443c 100644
--- a/cpukit/posix/src/mqueuerecvsupp.c
+++ b/cpukit/posix/src/mqueuerecvsupp.c
@@ -28,9 +28,15 @@
#include <rtems/system.h>
#include <rtems/score/watchdog.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/mqueueimpl.h>
+THREAD_WAIT_QUEUE_OBJECT_ASSERT(
+ POSIX_Message_queue_Control,
+ Message_queue.Wait_queue
+);
+
/*
* _POSIX_Message_queue_Receive_support
*
diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
index cd95a976d8..0ec9b852b2 100644
--- a/cpukit/posix/src/mutexlocksupp.c
+++ b/cpukit/posix/src/mutexlocksupp.c
@@ -24,9 +24,12 @@
#include <rtems/system.h>
#include <rtems/score/coremuteximpl.h>
#include <rtems/score/watchdog.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priorityimpl.h>
+THREAD_WAIT_QUEUE_OBJECT_ASSERT( POSIX_Mutex_Control, Mutex.Wait_queue );
+
/*
* _POSIX_Mutex_Lock_support
*
diff --git a/cpukit/posix/src/pbarrierwait.c b/cpukit/posix/src/pbarrierwait.c
index df4472b931..560e10146d 100644
--- a/cpukit/posix/src/pbarrierwait.c
+++ b/cpukit/posix/src/pbarrierwait.c
@@ -22,7 +22,9 @@
#include <errno.h>
#include <rtems/posix/barrierimpl.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
+
+THREAD_WAIT_QUEUE_OBJECT_ASSERT( POSIX_Barrier_Control, Barrier.Wait_queue );
/**
* This directive allows a thread to wait at a barrier.
diff --git a/cpukit/posix/src/prwlockwrlock.c b/cpukit/posix/src/prwlockwrlock.c
index 67774648ad..1905460a2a 100644
--- a/cpukit/posix/src/prwlockwrlock.c
+++ b/cpukit/posix/src/prwlockwrlock.c
@@ -24,7 +24,9 @@
#include <errno.h>
#include <rtems/posix/rwlockimpl.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
+
+THREAD_WAIT_QUEUE_OBJECT_ASSERT( POSIX_RWLock_Control, RWLock.Wait_queue );
/*
* pthread_rwlock_wrlock
diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c
index 5c055bea41..cf8fe63c93 100644
--- a/cpukit/posix/src/semaphorewaitsupp.c
+++ b/cpukit/posix/src/semaphorewaitsupp.c
@@ -27,9 +27,15 @@
#include <limits.h>
#include <rtems/system.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/posix/semaphoreimpl.h>
#include <rtems/seterr.h>
+THREAD_WAIT_QUEUE_OBJECT_ASSERT(
+ POSIX_Semaphore_Control,
+ Semaphore.Wait_queue
+);
+
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,