[rtems commit] score: Add missing const qualifiers

Sebastian Huber sebh at rtems.org
Tue Sep 6 09:16:33 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Aug 19 13:37:01 2016 +0200

score: Add missing const qualifiers

---

 cpukit/sapi/include/rtems/chain.h            |  8 ++++----
 cpukit/score/include/rtems/score/chainimpl.h | 12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/cpukit/sapi/include/rtems/chain.h b/cpukit/sapi/include/rtems/chain.h
index 25f02c9..f0e7ee4 100644
--- a/cpukit/sapi/include/rtems/chain.h
+++ b/cpukit/sapi/include/rtems/chain.h
@@ -312,7 +312,7 @@ RTEMS_INLINE_ROUTINE const rtems_chain_node *rtems_chain_immutable_tail(
  * @return This method returns the first node of the chain.
  */
 RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_first(
-  rtems_chain_control *the_chain
+  const rtems_chain_control *the_chain
 )
 {
   return _Chain_First( the_chain );
@@ -346,7 +346,7 @@ RTEMS_INLINE_ROUTINE const rtems_chain_node *rtems_chain_immutable_first(
  * @return This method returns the last node of the chain.
  */
 RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_last(
-  rtems_chain_control *the_chain
+  const rtems_chain_control *the_chain
 )
 {
   return _Chain_Last( the_chain );
@@ -379,7 +379,7 @@ RTEMS_INLINE_ROUTINE const rtems_chain_node *rtems_chain_immutable_last(
  * @return This method returns the next node on the chain.
  */
 RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_next(
-  rtems_chain_node *the_node
+  const rtems_chain_node *the_node
 )
 {
   return _Chain_Next( the_node );
@@ -411,7 +411,7 @@ RTEMS_INLINE_ROUTINE const rtems_chain_node *rtems_chain_immutable_next(
  * @return This method returns the previous node on the chain.
  */
 RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_previous(
-  rtems_chain_node *the_node
+  const rtems_chain_node *the_node
 )
 {
   return _Chain_Previous( the_node );
diff --git a/cpukit/score/include/rtems/score/chainimpl.h b/cpukit/score/include/rtems/score/chainimpl.h
index b50f4ff..4664175 100644
--- a/cpukit/score/include/rtems/score/chainimpl.h
+++ b/cpukit/score/include/rtems/score/chainimpl.h
@@ -256,10 +256,10 @@ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
  * @return This method returns the first node of the chain.
  */
 RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
-  Chain_Control *the_chain
+  const Chain_Control *the_chain
 )
 {
-  return _Chain_Head( the_chain )->next;
+  return _Chain_Immutable_head( the_chain )->next;
 }
 
 /**
@@ -290,10 +290,10 @@ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
  * @return This method returns the last node of the chain.
  */
 RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
-  Chain_Control *the_chain
+  const Chain_Control *the_chain
 )
 {
-  return _Chain_Tail( the_chain )->previous;
+  return _Chain_Immutable_tail( the_chain )->previous;
 }
 
 /**
@@ -323,7 +323,7 @@ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_last(
  * @return This method returns the next node on the chain.
  */
 RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
-  Chain_Node *the_node
+  const Chain_Node *the_node
 )
 {
   return the_node->next;
@@ -355,7 +355,7 @@ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next(
  * @return This method returns the previous node on the chain.
  */
 RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
-  Chain_Node *the_node
+  const Chain_Node *the_node
 )
 {
   return the_node->previous;




More information about the vc mailing list