summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/semobtain.c
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/src/semobtain.c
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/src/semobtain.c')
-rw-r--r--cpukit/rtems/src/semobtain.c12
1 files changed, 8 insertions, 4 deletions
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