summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/threadqimpl.h
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/include/rtems/score/threadqimpl.h
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/include/rtems/score/threadqimpl.h')
-rw-r--r--cpukit/include/rtems/score/threadqimpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/include/rtems/score/threadqimpl.h b/cpukit/include/rtems/score/threadqimpl.h
index ecbd8fd42f..8d537cc9e3 100644
--- a/cpukit/include/rtems/score/threadqimpl.h
+++ b/cpukit/include/rtems/score/threadqimpl.h
@@ -1207,7 +1207,7 @@ typedef struct {
Thread_queue_Control Wait_queue;
} Thread_queue_Object;
-#define THREAD_QUEUE_OBJECT_ASSERT( object_type, wait_queue_member ) \
+#define THREAD_QUEUE_OBJECT_ASSERT( object_type, wait_queue_member, msg ) \
RTEMS_STATIC_ASSERT( \
offsetof( object_type, wait_queue_member ) \
== offsetof( Thread_queue_Object, Wait_queue ) \
@@ -1217,7 +1217,7 @@ typedef struct {
Thread_queue_Object, \
Wait_queue \
), \
- object_type \
+ msg \
)
#define THREAD_QUEUE_QUEUE_TO_OBJECT( queue ) \