summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-05 08:11:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-05 13:41:07 +0200
commit1d39e96470b27195d35a69cc94551c403b7980bd (patch)
tree14c8ad389e18fb8ba9843f07326b8d12f11973ef /cpukit/rtems
parenttests: Use rtems_task_exit() (diff)
downloadrtems-1d39e96470b27195d35a69cc94551c403b7980bd.tar.bz2
score: Fix legacy RTEMS_STATIC_ASSERT()
In standard C pointer operands are not allowed in integer constant expressions. Avoid a static assertion based on an array typedef since this could lead to warnings ("variably modified 'x' at file scope" and "typedef 'x' locally defined but not used"); This implementation requires unique messages.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/barrierwait.c6
-rw-r--r--cpukit/rtems/src/msgqreceive.c6
-rw-r--r--cpukit/rtems/src/semobtain.c12
3 files changed, 18 insertions, 6 deletions
diff --git a/cpukit/rtems/src/barrierwait.c b/cpukit/rtems/src/barrierwait.c
index 4811c218b8..f30f152abe 100644
--- a/cpukit/rtems/src/barrierwait.c
+++ b/cpukit/rtems/src/barrierwait.c
@@ -21,7 +21,11 @@
#include <rtems/rtems/barrierimpl.h>
#include <rtems/rtems/statusimpl.h>
-THREAD_QUEUE_OBJECT_ASSERT( Barrier_Control, Barrier.Wait_queue );
+THREAD_QUEUE_OBJECT_ASSERT(
+ Barrier_Control,
+ Barrier.Wait_queue,
+ BARRIER_CONTROL
+);
rtems_status_code rtems_barrier_wait(
rtems_id id,
diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
index 2304be735a..606454d7c4 100644
--- a/cpukit/rtems/src/msgqreceive.c
+++ b/cpukit/rtems/src/msgqreceive.c
@@ -22,7 +22,11 @@
#include <rtems/rtems/optionsimpl.h>
#include <rtems/rtems/statusimpl.h>
-THREAD_QUEUE_OBJECT_ASSERT( Message_queue_Control, message_queue.Wait_queue );
+THREAD_QUEUE_OBJECT_ASSERT(
+ Message_queue_Control,
+ message_queue.Wait_queue,
+ MESSAGE_QUEUE_CONTROL
+);
rtems_status_code rtems_message_queue_receive(
rtems_id id,
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index db0c3f2e0c..2f73166df0 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -24,23 +24,27 @@
THREAD_QUEUE_OBJECT_ASSERT(
Semaphore_Control,
- Core_control.Wait_queue
+ Core_control.Wait_queue,
+ SEMAPHORE_CONTROL_GENERIC
);
THREAD_QUEUE_OBJECT_ASSERT(
Semaphore_Control,
- Core_control.Mutex.Recursive.Mutex.Wait_queue
+ Core_control.Mutex.Recursive.Mutex.Wait_queue,
+ SEMAPHORE_CONTROL_MUTEX
);
THREAD_QUEUE_OBJECT_ASSERT(
Semaphore_Control,
- Core_control.Semaphore.Wait_queue
+ Core_control.Semaphore.Wait_queue,
+ SEMAPHORE_CONTROL_SEMAPHORE
);
#if defined(RTEMS_SMP)
THREAD_QUEUE_OBJECT_ASSERT(
Semaphore_Control,
- Core_control.MRSP.Wait_queue
+ Core_control.MRSP.Wait_queue,
+ SEMAPHORE_CONTROL_MRSP
);
#endif