[rtems commit] mpci: Hide implementation details

Sebastian Huber sebh at rtems.org
Fri Oct 20 08:56:38 UTC 2023


Module:    rtems
Branch:    master
Commit:    c15132aafdfdb10883224d88ae1b21c0157a547f
Changeset: http://git.rtems.org/rtems/commit/?id=c15132aafdfdb10883224d88ae1b21c0157a547f

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Oct 20 11:09:42 2023 +0200

mpci: Hide implementation details

This improves the standard compatibility of API headers.  It fixes
errors like this if RTEMS_MULTIPROCESSING is enabled:

cpukit/include/rtems/score/processormask.h: In function 'uint32_t _Processor_mask_Find_last_set(const Processor_mask*)':
cpukit/include/rtems/score/processormask.h:339:21: error: 'flsl' was not declared in this scope
  339 |   return (uint32_t) __BIT_FLS( CPU_MAXIMUM_PROCESSORS, a );
      |                     ^~~~~~~~~

---

 cpukit/include/rtems/rtems/partdata.h | 6 ++++--
 cpukit/include/rtems/score/mpci.h     | 3 ---
 cpukit/include/rtems/score/mpciimpl.h | 3 +++
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partdata.h b/cpukit/include/rtems/rtems/partdata.h
index 864c47294e..6df4af81c5 100644
--- a/cpukit/include/rtems/rtems/partdata.h
+++ b/cpukit/include/rtems/rtems/partdata.h
@@ -116,6 +116,8 @@ typedef struct {
 extern Objects_Information _Partition_Information;
 
 #if defined(RTEMS_MULTIPROCESSING)
+struct _Thread_Control;
+
 /**
  * @brief Sends the extract proxy request.
  *
@@ -126,8 +128,8 @@ extern Objects_Information _Partition_Information;
  * @param id is the partition identifier.
  */
 void _Partition_MP_Send_extract_proxy (
-  Thread_Control *the_thread,
-  Objects_Id      id
+  struct _Thread_Control *the_thread,
+  Objects_Id              id
 );
 #endif
 
diff --git a/cpukit/include/rtems/score/mpci.h b/cpukit/include/rtems/score/mpci.h
index 874c195e95..796c881929 100644
--- a/cpukit/include/rtems/score/mpci.h
+++ b/cpukit/include/rtems/score/mpci.h
@@ -40,9 +40,6 @@
 #define _RTEMS_SCORE_MPCI_H
 
 #include <rtems/score/mppkt.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/watchdog.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/include/rtems/score/mpciimpl.h b/cpukit/include/rtems/score/mpciimpl.h
index b646d4be4d..d0c2d0558a 100644
--- a/cpukit/include/rtems/score/mpciimpl.h
+++ b/cpukit/include/rtems/score/mpciimpl.h
@@ -39,6 +39,9 @@
 #define _RTEMS_SCORE_MPCIIMPL_H
 
 #include <rtems/score/mpci.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/threadq.h>
+#include <rtems/score/watchdog.h>
 #include <rtems/score/status.h>
 
 #ifdef __cplusplus



More information about the vc mailing list