Add const Keyword to some function parameters in chainimpl.h
Andreas
andreas.dachsberger at gmail.com
Fri Apr 5 06:51:35 UTC 2019
Hi there,
while reviewing the doxygen documentation in this file I found some
instances where I think the function parameters should be made constant.
Bellow my suggested changes:
commit 9fc61307be4f21039b7cd4553099e29e5fd5e456 (HEAD)
Author: Andreas Dachsberger <andreas.dachsberger at embedded-brains.de>
Date: Fri Apr 5 08:28:08 2019 +0200
Added const to function parameters.
---
cpukit/include/rtems/score/chainimpl.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/cpukit/include/rtems/score/chainimpl.h
b/cpukit/include/rtems/score/chainimpl.h
index 0b9c193044..264cbe094c 100644
--- a/cpukit/include/rtems/score/chainimpl.h
+++ b/cpukit/include/rtems/score/chainimpl.h
@@ -222,7 +222,7 @@ RTEMS_INLINE_ROUTINE const Chain_Node
*_Chain_Immutable_head(
* @return This method returns the permanent tail node of the chain.
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
+ const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
@@ -555,7 +555,7 @@ RTEMS_INLINE_ROUTINE void _Chain_Initialize_one(
* @param[in] the_node is the node to be extracted.
*/
RTEMS_INLINE_ROUTINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
+ const Chain_Node *the_node
)
{
Chain_Node *next;
@@ -858,10 +858,10 @@ typedef bool ( *Chain_Node_order )(
* @param[in] order The order relation.
*/
RTEMS_INLINE_ROUTINE void _Chain_Insert_ordered_unprotected(
- Chain_Control *the_chain,
- Chain_Node *to_insert,
- const void *left,
- Chain_Node_order order
+ Chain_Control *the_chain,
+ Chain_Node *to_insert,
+ const void *left,
+ const Chain_Node_order order
)
{
const Chain_Node *tail = _Chain_Immutable_tail( the_chain );
@@ -960,7 +960,7 @@ RTEMS_INLINE_ROUTINE void
_Chain_Iterator_registry_initialize(
*/
RTEMS_INLINE_ROUTINE void _Chain_Iterator_registry_update(
Chain_Iterator_registry *the_registry,
- Chain_Node *the_node_to_extract
+ const Chain_Node *the_node_to_extract
)
{
Chain_Node *iter_node;
@@ -1046,10 +1046,10 @@ RTEMS_INLINE_ROUTINE void
_Chain_Iterator_registry_update(
* the linear time complexity in _Chain_Iterator_registry_update().
*/
RTEMS_INLINE_ROUTINE void _Chain_Iterator_initialize(
- Chain_Control *the_chain,
- Chain_Iterator_registry *the_registry,
- Chain_Iterator *the_iterator,
- Chain_Iterator_direction direction
+ const Chain_Control *the_chain,
+ Chain_Iterator_registry *the_registry,
+ Chain_Iterator *the_iterator,
+ const Chain_Iterator_direction direction
)
{
_Chain_Initialize_node( &the_iterator->Registry_node );
@@ -1093,8 +1093,8 @@ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Iterator_next(
* @param the_node The new iterator position.
*/
RTEMS_INLINE_ROUTINE void _Chain_Iterator_set_position(
- Chain_Iterator *the_iterator,
- Chain_Node *the_node
+ Chain_Iterator *the_iterator,
+ const Chain_Node *the_node
)
{
the_iterator->position = the_node;
@@ -1108,7 +1108,7 @@ RTEMS_INLINE_ROUTINE void
_Chain_Iterator_set_position(
* @param the_iterator The chain iterator.
*/
RTEMS_INLINE_ROUTINE void _Chain_Iterator_destroy(
- Chain_Iterator *the_iterator
+ const Chain_Iterator *the_iterator
)
{
_Chain_Extract_unprotected( &the_iterator->Registry_node );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190405/54e809be/attachment.html>
More information about the devel
mailing list