summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-21 10:58:15 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-24 09:22:36 +0100
commit88543adeb5c7d18e179d18c84ea8c98d0a90c3c8 (patch)
tree64d4cdc9198d6148d732cdd41261ad93e7d69e28 /cpukit
parentscore: Simplify core barrier (diff)
downloadrtems-88543adeb5c7d18e179d18c84ea8c98d0a90c3c8.tar.bz2
score: Remove _CORE_barrier_Do_flush()
Call _Thread_queue_Flush_critical() directly.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/Makefile.am1
-rw-r--r--cpukit/include/rtems/score/corebarrierimpl.h23
-rw-r--r--cpukit/score/src/corebarrierrelease.c37
3 files changed, 6 insertions, 55 deletions
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 14abc8bb6a..a31cd31596 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -833,7 +833,6 @@ librtemscpu_a_SOURCES += score/src/apimutexisowner.c
librtemscpu_a_SOURCES += score/src/apimutexlock.c
librtemscpu_a_SOURCES += score/src/apimutexunlock.c
librtemscpu_a_SOURCES += score/src/corebarrier.c
-librtemscpu_a_SOURCES += score/src/corebarrierrelease.c
librtemscpu_a_SOURCES += score/src/corebarrierwait.c
librtemscpu_a_SOURCES += score/src/coremsg.c
librtemscpu_a_SOURCES += score/src/coremsgbroadcast.c
diff --git a/cpukit/include/rtems/score/corebarrierimpl.h b/cpukit/include/rtems/score/corebarrierimpl.h
index 86a3e956dc..4e7f07d8e9 100644
--- a/cpukit/include/rtems/score/corebarrierimpl.h
+++ b/cpukit/include/rtems/score/corebarrierimpl.h
@@ -128,19 +128,6 @@ Status_Control _CORE_barrier_Seize(
);
/**
- * @brief Flushes the barrier.
- *
- * @param[in, out] the_barrier The barrier to flush.
- * @param[out] filter The filter for flushing.
- * @param[out] queue_context The thread queue context.
- */
-uint32_t _CORE_barrier_Do_flush(
- CORE_barrier_Control *the_barrier,
- Thread_queue_Flush_filter filter,
- Thread_queue_Context *queue_context
-);
-
-/**
* @brief Manually releases the barrier.
*
* This routine manually releases the barrier. All of the threads waiting
@@ -156,8 +143,9 @@ RTEMS_INLINE_ROUTINE uint32_t _CORE_barrier_Surrender(
Thread_queue_Context *queue_context
)
{
- return _CORE_barrier_Do_flush(
- the_barrier,
+ return _Thread_queue_Flush_critical(
+ &the_barrier->Wait_queue.Queue,
+ &_CORE_barrier_Thread_queue_operations,
_Thread_queue_Flush_default_filter,
queue_context
);
@@ -174,8 +162,9 @@ RTEMS_INLINE_ROUTINE void _CORE_barrier_Flush(
Thread_queue_Context *queue_context
)
{
- _CORE_barrier_Do_flush(
- the_barrier,
+ _Thread_queue_Flush_critical(
+ &the_barrier->Wait_queue.Queue,
+ &_CORE_barrier_Thread_queue_operations,
_Thread_queue_Flush_status_object_was_deleted,
queue_context
);
diff --git a/cpukit/score/src/corebarrierrelease.c b/cpukit/score/src/corebarrierrelease.c
deleted file mode 100644
index 3202171e7f..0000000000
--- a/cpukit/score/src/corebarrierrelease.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file
- *
- * @ingroup RTEMSScoreBarrier
- *
- * @brief This source file contains the implementation of
- * _CORE_barrier_Do_flush().
- */
-
-/*
- * COPYRIGHT (c) 1989-2006.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/score/corebarrierimpl.h>
-
-uint32_t _CORE_barrier_Do_flush(
- CORE_barrier_Control *the_barrier,
- Thread_queue_Flush_filter filter,
- Thread_queue_Context *queue_context
-)
-{
- return _Thread_queue_Flush_critical(
- &the_barrier->Wait_queue.Queue,
- &_CORE_barrier_Thread_queue_operations,
- filter,
- queue_context
- );
-}