summaryrefslogtreecommitdiffstats
path: root/testsuites/validation/tc-sem-flush.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/validation/tc-sem-flush.c')
-rw-r--r--testsuites/validation/tc-sem-flush.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/testsuites/validation/tc-sem-flush.c b/testsuites/validation/tc-sem-flush.c
index af8f5407cd..4fb2027354 100644
--- a/testsuites/validation/tc-sem-flush.c
+++ b/testsuites/validation/tc-sem-flush.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsSemReqFlush
+ * @ingroup RtemsSemReqFlush
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -64,9 +64,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsSemReqFlush spec:/rtems/sem/req/flush
+ * @defgroup RtemsSemReqFlush spec:/rtems/sem/req/flush
*
- * @ingroup RTEMSTestSuiteTestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationNoClock0
*
* @{
*/
@@ -118,7 +118,7 @@ typedef struct {
/**
* @brief This member contains the thread queue test context.
*/
- TQContext tq_ctx;;
+ TQContext tq_ctx;
/**
* @brief This member specifies if the attribute set of the semaphore.
@@ -228,12 +228,16 @@ static Status_Control Enqueue( TQContext *tq_ctx, TQWait wait )
return STATUS_BUILD( STATUS_SUCCESSFUL, 0 );
}
-static void Flush( TQContext *tq_ctx )
+static uint32_t Flush( TQContext *tq_ctx, uint32_t thread_count, bool all )
{
rtems_status_code sc;
+ (void) all;
+
sc = rtems_semaphore_flush( tq_ctx->thread_queue_id );
T_rsc_success( sc );
+
+ return thread_count;
}
static void RtemsSemReqFlush_Pre_Class_Prepare(
@@ -401,16 +405,16 @@ static void RtemsSemReqFlush_Post_Action_Check(
case RtemsSemReqFlush_Post_Action_FlushFIFO: {
/*
* The calling task shall flush the semaphore as specified by
- * /score/tq/req/flush-fifo.
+ * spec:/score/tq/req/flush-fifo.
*/
- ScoreTqReqFlushFifo_Run( &ctx->tq_ctx );
+ ScoreTqReqFlushFifo_Run( &ctx->tq_ctx, false );
break;
}
case RtemsSemReqFlush_Post_Action_FlushPriority: {
/*
* The calling task shall flush the semaphore as specified by
- * /score/tq/req/flush-priority.
+ * spec:/score/tq/req/flush-priority.
*/
ScoreTqReqFlushPriority_Run( &ctx->tq_ctx, true );
break;
@@ -419,7 +423,7 @@ static void RtemsSemReqFlush_Post_Action_Check(
case RtemsSemReqFlush_Post_Action_FlushPriorityCeiling: {
/*
* The calling task shall flush the semaphore as specified by
- * /score/tq/req/flush-priority.
+ * spec:/score/tq/req/flush-priority.
*/
ScoreTqReqFlushPriority_Run( &ctx->tq_ctx, false );
break;
@@ -428,7 +432,7 @@ static void RtemsSemReqFlush_Post_Action_Check(
case RtemsSemReqFlush_Post_Action_FlushPriorityInherit: {
/*
* The calling task shall flush the semaphore as specified by
- * /score/tq/req/flush-priority-inherit.
+ * spec:/score/tq/req/flush-priority-inherit.
*/
ScoreTqReqFlushPriorityInherit_Run( &ctx->tq_ctx );
break;
@@ -494,7 +498,9 @@ static void RtemsSemReqFlush_Action( RtemsSemReqFlush_Context *ctx )
static void RtemsSemReqFlush_Cleanup( RtemsSemReqFlush_Context *ctx )
{
rtems_status_code sc;
- sc = rtems_semaphore_delete( ctx->tq_ctx.thread_queue_id ); T_rsc_success( sc );
+
+ sc = rtems_semaphore_delete( ctx->tq_ctx.thread_queue_id );
+ T_rsc_success( sc );
}
static const RtemsSemReqFlush_Entry