diff options
Diffstat (limited to 'testsuites/validation/tx-thread-queue.c')
-rw-r--r-- | testsuites/validation/tx-thread-queue.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/testsuites/validation/tx-thread-queue.c b/testsuites/validation/tx-thread-queue.c index 1b0e8665c7..ee9d2cf96d 100644 --- a/testsuites/validation/tx-thread-queue.c +++ b/testsuites/validation/tx-thread-queue.c @@ -3,14 +3,14 @@ /** * @file * - * @ingroup RTEMSTestSuites + * @ingroup RTEMSTestSuitesValidation * * @brief This source file contains the implementation of the thread queue test * support. */ /* - * 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 @@ -333,8 +333,12 @@ static void Worker( rtems_task_argument arg, TQWorkerKind worker ) _Thread_Dispatch_direct( cpu_self ); } - if ( ( events & TQ_EVENT_FLUSH ) != 0 ) { - TQFlush( ctx ); + if ( ( events & TQ_EVENT_FLUSH_ALL ) != 0 ) { + TQFlush( ctx, true ); + } + + if ( ( events & TQ_EVENT_FLUSH_PARTIAL ) != 0 ) { + TQFlush( ctx, false ); } if ( ( events & TQ_EVENT_ENQUEUE_DONE ) != 0 ) { @@ -647,9 +651,9 @@ Status_Control TQSurrender( TQContext *ctx ) return ( *ctx->surrender )( ctx ); } -void TQFlush( TQContext *ctx ) +void TQFlush( TQContext *ctx, bool flush_all ) { - ( *ctx->flush )( ctx ); + ctx->flush_count = ( *ctx->flush )( ctx, ctx->how_many, flush_all ); } rtems_tcb *TQGetOwner( TQContext *ctx ) |