[rtems commit] Avoid ISR_LOCK_MEMBER() since it confuses Doxygen

Sebastian Huber sebh at rtems.org
Fri Dec 10 07:39:10 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Oct 14 10:47:44 2020 +0200

Avoid ISR_LOCK_MEMBER() since it confuses Doxygen

If RTEMS_SMP is not defined, then Doxygen adds the comments intended for
conditional the lock member to the next member.

---

 cpukit/include/rtems/rtems/partdata.h    | 4 +++-
 cpukit/include/rtems/rtems/ratemondata.h | 4 +++-
 cpukit/include/rtems/score/percpu.h      | 4 +++-
 cpukit/include/rtems/score/scheduler.h   | 4 ++--
 cpukit/include/rtems/score/thread.h      | 4 +++-
 cpukit/include/rtems/score/userextimpl.h | 4 +++-
 6 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partdata.h b/cpukit/include/rtems/rtems/partdata.h
index 196c214..a6bcee2 100644
--- a/cpukit/include/rtems/rtems/partdata.h
+++ b/cpukit/include/rtems/rtems/partdata.h
@@ -41,11 +41,13 @@ typedef struct {
    */
   Objects_Control Object;
 
+#if defined(RTEMS_SMP)
   /**
    * @brief This lock protects the chain of unallocated buffers and the number
    *   of allocated buffers.
    */
-  ISR_LOCK_MEMBER( Lock )
+  ISR_lock_Control Lock;
+#endif
 
   /**
    * @brief This member contains the base address of the buffer area.
diff --git a/cpukit/include/rtems/rtems/ratemondata.h b/cpukit/include/rtems/rtems/ratemondata.h
index f35fa7e..700285c 100644
--- a/cpukit/include/rtems/rtems/ratemondata.h
+++ b/cpukit/include/rtems/rtems/ratemondata.h
@@ -71,10 +71,12 @@ typedef struct {
   /** This field is the object management portion of a Period instance. */
   Objects_Control                         Object;
 
+#if defined(RTEMS_SMP)
   /**
    * @brief Protects the rate monotonic period state.
    */
-  ISR_LOCK_MEMBER(                        Lock )
+  ISR_lock_Control                        Lock;
+#endif
 
   /** This is the timer used to provide the unblocking mechanism. */
   Watchdog_Control                        Timer;
diff --git a/cpukit/include/rtems/score/percpu.h b/cpukit/include/rtems/score/percpu.h
index 0794f15..1dfa7f6 100644
--- a/cpukit/include/rtems/score/percpu.h
+++ b/cpukit/include/rtems/score/percpu.h
@@ -465,10 +465,12 @@ typedef struct Per_CPU_Control {
    * @brief Watchdog state for this processor.
    */
   struct {
+#if defined(RTEMS_SMP)
     /**
      * @brief Protects all watchdog operations on this processor.
      */
-    ISR_LOCK_MEMBER( Lock )
+    ISR_lock_Control Lock;
+#endif
 
     /**
      * @brief Watchdog ticks on this processor used for monotonic clock
diff --git a/cpukit/include/rtems/score/scheduler.h b/cpukit/include/rtems/score/scheduler.h
index 95b4414..55be638 100644
--- a/cpukit/include/rtems/score/scheduler.h
+++ b/cpukit/include/rtems/score/scheduler.h
@@ -297,12 +297,12 @@ typedef struct {
  * this structure at the begin of its context structure.
  */
 typedef struct Scheduler_Context {
+#if defined(RTEMS_SMP)
   /**
    * @brief Lock to protect this scheduler instance.
    */
-  ISR_LOCK_MEMBER( Lock )
+  ISR_lock_Control Lock;
 
-#if defined(RTEMS_SMP)
   /**
    * @brief The set of processors owned by this scheduler instance.
    */
diff --git a/cpukit/include/rtems/score/thread.h b/cpukit/include/rtems/score/thread.h
index c3c37eb..adde98f 100644
--- a/cpukit/include/rtems/score/thread.h
+++ b/cpukit/include/rtems/score/thread.h
@@ -673,10 +673,12 @@ typedef struct {
    */
   RBTree_Control Key_value_pairs;
 
+#if defined(RTEMS_SMP)
   /**
    * @brief Lock to protect the tree operations.
    */
-  ISR_LOCK_MEMBER( Lock )
+  ISR_lock_Control Lock;
+#endif
 } Thread_Keys_information;
 
 /**
diff --git a/cpukit/include/rtems/score/userextimpl.h b/cpukit/include/rtems/score/userextimpl.h
index fd075a9..649d191 100644
--- a/cpukit/include/rtems/score/userextimpl.h
+++ b/cpukit/include/rtems/score/userextimpl.h
@@ -60,11 +60,13 @@ typedef struct {
    */
   Chain_Iterator_registry Iterators;
 
+#if defined(RTEMS_SMP)
   /**
    * @brief Lock to protect User_extensions_List::Active and
    * User_extensions_List::Iterators.
    */
-  ISR_LOCK_MEMBER( Lock )
+  ISR_lock_Control Lock;
+#endif
 } User_extensions_List;
 
 /**



More information about the vc mailing list