summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-11 14:56:12 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:48 +0200
commitd8752860e50a495f5d886275b7eb407aa9ec8b1c (patch)
treed3cc1f9861b43ce7e27298492856ab931734b900 /testsuites/sptests
parentscore: Do not inline SMP lock if profiling enabled (diff)
downloadrtems-d8752860e50a495f5d886275b7eb407aa9ec8b1c.tar.bz2
score: Add static initializers for thread queues
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/spthreadq01/init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 5add92bb5d..ce47760e2d 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -18,6 +18,12 @@
const char rtems_test_name[] = "SPTHREADQ 1";
+static Thread_queue_Control fifo_queue =
+ THREAD_QUEUE_FIFO_INITIALIZER( fifo_queue, "FIFO" );
+
+static Thread_queue_Control prio_queue =
+ THREAD_QUEUE_PRIORIY_INITIALIZER( prio_queue, "Prio" );
+
static rtems_task Init(
rtems_task_argument ignored
)
@@ -30,6 +36,14 @@ static rtems_task Init(
_Thread_Enable_dispatch();
/* is there more to check? */
+ rtems_test_assert( _Chain_Is_empty( &fifo_queue.Queues.Fifo ) );
+ rtems_test_assert( fifo_queue.operations == &_Thread_queue_Operations_FIFO );
+
+ rtems_test_assert( _RBTree_Is_empty( &fifo_queue.Queues.Priority ) );
+ rtems_test_assert(
+ prio_queue.operations == &_Thread_queue_Operations_priority
+ );
+
TEST_END();
rtems_test_exit(0);
}