forked from Imagelibrary/rtems
score: Doxygen Clean Up Task #18
http://www.google-melange.com/gci/task/view/google/gci2012/8137204
This commit is contained in:
committed by
Gedare Bloom
parent
f12ef23941
commit
d8134178de
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/address.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This include file contains the bodies of the routines
|
||||
* about addresses which are inlined.
|
||||
* @brief Inlined Routines Associated with Addresses
|
||||
*
|
||||
* This include file contains the bodies of the routines
|
||||
* about addresses which are inlined.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -24,20 +26,22 @@
|
||||
#include <rtems/score/basedefs.h>
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreAddress
|
||||
* @{
|
||||
* @addtogroup ScoreAddress
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @brief Add Offset to Address
|
||||
/**
|
||||
* @brief Add offset to an address.
|
||||
*
|
||||
* This function is used to add an @a offset to a @a base address.
|
||||
* It returns the resulting address. This address is typically
|
||||
* converted to an access type before being used further.
|
||||
* This function is used to add an @a offset to a @a base address.
|
||||
* It returns the resulting address. This address is typically
|
||||
* converted to an access type before being used further.
|
||||
*
|
||||
* @param[in] base is the base address.
|
||||
* @param[in] offset is the offset to add to @a base.
|
||||
* @param[in] base is the base address.
|
||||
* @param[in] offset is the offset to add to @a base.
|
||||
*
|
||||
* @return This method returns the resulting address.
|
||||
* @return This method returns the resulting address.
|
||||
*/
|
||||
#include <rtems/bspIo.h>
|
||||
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
|
||||
@@ -48,16 +52,17 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
|
||||
return (void *)((uintptr_t)base + offset);
|
||||
}
|
||||
|
||||
/** @brief Subtract Offset from Offset
|
||||
/**
|
||||
* @brief Subtract offset from offset.
|
||||
*
|
||||
* This function is used to subtract an @a offset from a @a base
|
||||
* address. It returns the resulting address. This address is
|
||||
* typically converted to an access type before being used further.
|
||||
* This function is used to subtract an @a offset from a @a base
|
||||
* address. It returns the resulting address. This address is
|
||||
* typically converted to an access type before being used further.
|
||||
*
|
||||
* @param[in] base is the base address.
|
||||
* @param[in] offset is the offset to subtract to @a base.
|
||||
* @param[in] base is the base address.
|
||||
* @param[in] offset is the offset to subtract to @a base.
|
||||
*
|
||||
* @return This method returns the resulting address.
|
||||
* @return This method returns the resulting address.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset (
|
||||
@@ -68,18 +73,19 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset (
|
||||
return (void *)((uintptr_t)base - offset);
|
||||
}
|
||||
|
||||
/** @brief Subtract Two Offsets
|
||||
/**
|
||||
* @brief Subtract two offsets.
|
||||
*
|
||||
* This function is used to subtract two addresses. It returns the
|
||||
* resulting offset.
|
||||
* This function is used to subtract two addresses. It returns the
|
||||
* resulting offset.
|
||||
*
|
||||
* @param[in] left is the address on the left hand side of the subtraction.
|
||||
* @param[in] right is the address on the right hand side of the subtraction.
|
||||
* @param[in] left is the address on the left hand side of the subtraction.
|
||||
* @param[in] right is the address on the right hand side of the subtraction.
|
||||
*
|
||||
* @return This method returns the resulting address.
|
||||
* @return This method returns the resulting address.
|
||||
*
|
||||
* @note The cast of an address to an uint32_t makes this code
|
||||
* dependent on an addresses being thirty two bits.
|
||||
* @note The cast of an address to an uint32_t makes this code
|
||||
* dependent on an addresses being thirty two bits.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
|
||||
const void *left,
|
||||
@@ -89,16 +95,17 @@ RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
|
||||
return (int32_t) ((const char *) left - (const char *) right);
|
||||
}
|
||||
|
||||
/** @brief Is Address Aligned
|
||||
/**
|
||||
* @brief Is address aligned.
|
||||
*
|
||||
* This function returns true if the given address is correctly
|
||||
* aligned for this processor and false otherwise. Proper alignment
|
||||
* is based on correctness and efficiency.
|
||||
* This function returns true if the given address is correctly
|
||||
* aligned for this processor and false otherwise. Proper alignment
|
||||
* is based on correctness and efficiency.
|
||||
*
|
||||
* @param[in] address is the address being checked for alignment.
|
||||
* @param[in] address is the address being checked for alignment.
|
||||
*
|
||||
* @return This method returns true if the address is aligned and
|
||||
* false otherwise.
|
||||
* @retval true The @a address is aligned.
|
||||
* @retval false The @a address is not aligned.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned (
|
||||
const void *address
|
||||
@@ -111,20 +118,21 @@ RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @brief Is Address In Range
|
||||
/**
|
||||
* @brief Is address in range.
|
||||
*
|
||||
* This function returns true if the given address is within the
|
||||
* memory range specified and false otherwise. base is the address
|
||||
* of the first byte in the memory range and limit is the address
|
||||
* of the last byte in the memory range. The base address is
|
||||
* assumed to be lower than the limit address.
|
||||
* This function returns true if the given address is within the
|
||||
* memory range specified and false otherwise. base is the address
|
||||
* of the first byte in the memory range and limit is the address
|
||||
* of the last byte in the memory range. The base address is
|
||||
* assumed to be lower than the limit address.
|
||||
*
|
||||
* @param[in] address is the address to check.
|
||||
* @param[in] base is the lowest address of the range to check against.
|
||||
* @param[in] limit is the highest address of the range to check against.
|
||||
* @param[in] address is the address to check.
|
||||
* @param[in] base is the lowest address of the range to check against.
|
||||
* @param[in] limit is the highest address of the range to check against.
|
||||
*
|
||||
* @return This method returns true if the given @a address is within the
|
||||
* memory range specified and false otherwise.
|
||||
* @retval true The @a address is within the memory range specified
|
||||
* @retval false The @a address is not within the memory range specified.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range (
|
||||
const void *address,
|
||||
@@ -135,7 +143,7 @@ RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range (
|
||||
return (address >= base && address <= limit);
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/coremutex.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This include file contains all of the inlined routines associated
|
||||
* with the CORE mutexes.
|
||||
* @brief Inlined Routines Associated with the CORE Mutexes
|
||||
*
|
||||
* This include file contains all of the inlined routines associated
|
||||
* with the CORE mutexes.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -22,19 +24,21 @@
|
||||
#define _RTEMS_SCORE_COREMUTEX_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreMutex
|
||||
* @{
|
||||
* @addtogroup ScoreMutex
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Is Mutex Locked
|
||||
* @brief Is mutex locked.
|
||||
*
|
||||
* This routine returns true if the mutex specified is locked and false
|
||||
* otherwise.
|
||||
* This routine returns true if the mutex specified is locked and false
|
||||
* otherwise.
|
||||
*
|
||||
* @param[in] the_mutex is the mutex to check
|
||||
* @param[in] the_mutex is the mutex to check.
|
||||
*
|
||||
* @return This method returns true if the mutex is locked.
|
||||
* @retval true The mutex is locked.
|
||||
* @retval false The mutex is not locked.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_locked(
|
||||
CORE_mutex_Control *the_mutex
|
||||
@@ -42,16 +46,17 @@ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_locked(
|
||||
{
|
||||
return the_mutex->lock == CORE_MUTEX_LOCKED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Does Core Mutex Use FIFO Blocking
|
||||
* @brief Does core mutex use FIFO blocking.
|
||||
*
|
||||
* This routine returns true if the mutex's wait discipline is FIFO and false
|
||||
* otherwise.
|
||||
* This routine returns true if the mutex's wait discipline is FIFO and false
|
||||
* otherwise.
|
||||
*
|
||||
* @param[in] the_attribute is the attribute set of the mutex
|
||||
* @param[in] the_attribute is the attribute set of the mutex.
|
||||
*
|
||||
* @return This method returns true if the mutex is using FIFO blocking order.
|
||||
* @retval true The mutex is using FIFO blocking order.
|
||||
* @retval false The mutex is not using FIFO blocking order.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_fifo(
|
||||
CORE_mutex_Attributes *the_attribute
|
||||
@@ -59,17 +64,18 @@ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_fifo(
|
||||
{
|
||||
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_FIFO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Doex Core Mutex Use Priority Blocking
|
||||
* @brief Doex core mutex use priority blocking.
|
||||
*
|
||||
* This routine returns true if the mutex's wait discipline is PRIORITY and
|
||||
* false otherwise.
|
||||
* This routine returns true if the mutex's wait discipline is PRIORITY and
|
||||
* false otherwise.
|
||||
*
|
||||
* @param[in] the_attribute is the attribute set of the mutex
|
||||
* @param[in] the_attribute is the attribute set of the mutex.
|
||||
*
|
||||
* @retval true The mutex is using priority blocking order.
|
||||
* @retval false The mutex is not using priority blocking order.
|
||||
*
|
||||
* @return This method returns true if the mutex is using
|
||||
* priority blocking order.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_priority(
|
||||
CORE_mutex_Attributes *the_attribute
|
||||
@@ -77,17 +83,17 @@ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_priority(
|
||||
{
|
||||
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Does Mutex Use Priority Inheritance
|
||||
* @brief Does mutex use priority inheritance.
|
||||
*
|
||||
* This routine returns true if the mutex's wait discipline is
|
||||
* INHERIT_PRIORITY and false otherwise.
|
||||
* This routine returns true if the mutex's wait discipline is
|
||||
* INHERIT_PRIORITY and false otherwise.
|
||||
*
|
||||
* @param[in] the_attribute is the attribute set of the mutex
|
||||
* @param[in] the_attribute is the attribute set of the mutex.
|
||||
*
|
||||
* @return This method returns true if the mutex is using priority
|
||||
* inheritance.
|
||||
* @retval true The mutex is using priority inheritance.
|
||||
* @retval false The mutex is not using priority inheritance.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
|
||||
CORE_mutex_Attributes *the_attribute
|
||||
@@ -95,16 +101,17 @@ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
|
||||
{
|
||||
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Does Mutex Use Priority Ceiling
|
||||
* @brief Does mutex use priority ceiling.
|
||||
*
|
||||
* This routine returns true if the mutex's wait discipline is
|
||||
* PRIORITY_CEILING and false otherwise.
|
||||
* This routine returns true if the mutex's wait discipline is
|
||||
* PRIORITY_CEILING and false otherwise.
|
||||
*
|
||||
* @param[in] the_attribute is the attribute set of the mutex
|
||||
* @return This method returns true if the mutex is using priority
|
||||
* ceiling.
|
||||
* @param[in] the_attribute is the attribute set of the mutex.
|
||||
*
|
||||
* @retval true The mutex is using priority ceiling.
|
||||
* @retval false The mutex is not using priority ceiling.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_priority_ceiling(
|
||||
CORE_mutex_Attributes *the_attribute
|
||||
@@ -112,7 +119,7 @@ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_priority_ceiling(
|
||||
{
|
||||
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Seize Mutex with Quick Success Path
|
||||
*
|
||||
@@ -221,7 +228,7 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body(
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup ScoreHeap
|
||||
*
|
||||
* @brief Heap Handler API.
|
||||
* @brief Heap Handler API
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -201,7 +199,8 @@ RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
|
||||
*
|
||||
* The next block of the last block will be the first block. Since the first
|
||||
* block indicates that the previous block is used, this ensures that the last
|
||||
* block appears as used for the _Heap_Is_used() and _Heap_Is_free() functions.
|
||||
* block appears as used for the _Heap_Is_used() and _Heap_Is_free()
|
||||
* functions.
|
||||
*
|
||||
* This feature will be used to terminate the scattered heap area list. See
|
||||
* also _Heap_Extend().
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/**
|
||||
* @file rtems/score/priority.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Inlined Routines in the Priority Handler
|
||||
*
|
||||
* This file contains the static inline implementation of all inlined
|
||||
* routines in the Priority Handler.
|
||||
@@ -22,20 +24,21 @@
|
||||
#define _RTEMS_SCORE_PRIORITY_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScorePriority
|
||||
* @{
|
||||
* @addtogroup ScorePriority
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* This function returns true if the_priority if valid for a
|
||||
* user task, and false otherwise.
|
||||
* This function returns true if the_priority if valid for a
|
||||
* user task, and false otherwise.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE bool _Priority_Is_valid (
|
||||
Priority_Control the_priority
|
||||
)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
|
||||
* then checking for less than 0 is unnecessary.
|
||||
*/
|
||||
@@ -45,7 +48,7 @@ RTEMS_INLINE_ROUTINE bool _Priority_Is_valid (
|
||||
|
||||
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/prioritybitmap.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This file contains the static inline implementation of all inlined
|
||||
* routines in the Priority Handler bit map implementation
|
||||
* @brief Inlined Routines in the Priority Handler Bit Map Implementation
|
||||
*
|
||||
* This file contains the static inline implementation of all inlined
|
||||
* routines in the Priority Handler bit map implementation
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -22,14 +24,15 @@
|
||||
#define _RTEMS_SCORE_PRIORITYBITMAP_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScorePriority
|
||||
* @{
|
||||
* @addtogroup ScorePriority
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <rtems/score/bitfield.h>
|
||||
|
||||
/**
|
||||
* This function returns the major portion of the_priority.
|
||||
* This function returns the major portion of the_priority.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Major (
|
||||
@@ -40,7 +43,7 @@ RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Major (
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns the minor portion of the_priority.
|
||||
* This function returns the minor portion of the_priority.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Minor (
|
||||
@@ -51,23 +54,23 @@ RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Minor (
|
||||
}
|
||||
|
||||
#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
|
||||
|
||||
|
||||
/**
|
||||
* This function returns the mask associated with the major or minor
|
||||
* number passed to it.
|
||||
* This function returns the mask associated with the major or minor
|
||||
* number passed to it.
|
||||
*/
|
||||
|
||||
|
||||
RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Mask (
|
||||
uint32_t bit_number
|
||||
)
|
||||
{
|
||||
return (Priority_bit_map_Control)(0x8000u >> bit_number);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function returns the mask bit inverted.
|
||||
* This function returns the mask bit inverted.
|
||||
*/
|
||||
|
||||
|
||||
RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Mask_invert (
|
||||
uint32_t mask
|
||||
)
|
||||
@@ -75,13 +78,13 @@ RTEMS_INLINE_ROUTINE Priority_bit_map_Control _Priority_Mask_invert (
|
||||
return (Priority_bit_map_Control)(~mask);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function translates the bit numbers returned by the bit scan
|
||||
* of a priority bit field into something suitable for use as
|
||||
* a major or minor component of a priority.
|
||||
* This function translates the bit numbers returned by the bit scan
|
||||
* of a priority bit field into something suitable for use as
|
||||
* a major or minor component of a priority.
|
||||
*/
|
||||
|
||||
|
||||
RTEMS_INLINE_ROUTINE uint32_t _Priority_Bits_index (
|
||||
uint32_t bit_number
|
||||
)
|
||||
@@ -96,7 +99,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Bits_index (
|
||||
*/
|
||||
|
||||
/**
|
||||
* This routine performs the initialization necessary for this handler.
|
||||
* This routine performs the initialization necessary for this handler.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Handler_initialization( void )
|
||||
@@ -109,8 +112,8 @@ RTEMS_INLINE_ROUTINE void _Priority_bit_map_Handler_initialization( void )
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine uses the_priority_map to update the priority
|
||||
* bit maps to indicate that a thread has been readied.
|
||||
* This routine uses the_priority_map to update the priority
|
||||
* bit maps to indicate that a thread has been readied.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
|
||||
@@ -122,9 +125,9 @@ RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine uses the_priority_map to update the priority
|
||||
* bit maps to indicate that a thread has been removed from the
|
||||
* ready state.
|
||||
* This routine uses the_priority_map to update the priority
|
||||
* bit maps to indicate that a thread has been removed from the
|
||||
* ready state.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
|
||||
@@ -137,8 +140,8 @@ RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns the priority of the highest priority
|
||||
* ready thread.
|
||||
* This function returns the priority of the highest priority
|
||||
* ready thread.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
|
||||
@@ -154,9 +157,9 @@ RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine initializes the_priority_map so that it
|
||||
* contains the information necessary to manage a thread
|
||||
* at new_priority.
|
||||
* This routine initializes the_priority_map so that it
|
||||
* contains the information necessary to manage a thread
|
||||
* at new_priority.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information(
|
||||
@@ -185,7 +188,7 @@ RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information(
|
||||
the_priority_map->block_minor = (Priority_bit_map_Control)(~((uint32_t)mask));
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/**
|
||||
* @file rtems/score/rbtree.inl
|
||||
* @file
|
||||
*
|
||||
* This include file contains the bodies of the routines which are
|
||||
* associated with Red-Black Trees and inlined.
|
||||
* @brief Inlined Routines Associated with Red-Black Trees
|
||||
*
|
||||
* @note The routines in this file are ordered from simple
|
||||
* to complex. No other RBTree Handler routine is referenced
|
||||
* unless it has already been defined.
|
||||
* This include file contains the bodies of the routines which are
|
||||
* associated with Red-Black Trees and inlined.
|
||||
*
|
||||
* @note The routines in this file are ordered from simple
|
||||
* to complex. No other RBTree Handler routine is referenced
|
||||
* unless it has already been defined.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -25,12 +27,13 @@
|
||||
#define _RTEMS_SCORE_RBTREE_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreRBTree
|
||||
* @{
|
||||
* @addtogroup ScoreRBTree
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Get the direction opposite to @a the_dir
|
||||
* @brief Get the direction opposite to @a the_dir.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
|
||||
RBTree_Direction the_dir
|
||||
@@ -39,10 +42,11 @@ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
|
||||
return (RBTree_Direction) !((int) the_dir);
|
||||
}
|
||||
|
||||
/** @brief Set off rbtree
|
||||
/**
|
||||
* @brief Set off RBtree.
|
||||
*
|
||||
* This function sets the parent and child fields of the @a node to NULL
|
||||
* indicating the @a node is not part of a rbtree.
|
||||
* This function sets the parent and child fields of the @a node to NULL
|
||||
* indicating the @a node is not part of a rbtree.
|
||||
*
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
|
||||
@@ -52,10 +56,11 @@ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
|
||||
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
|
||||
}
|
||||
|
||||
/** @brief Is the Node off RBTree
|
||||
/**
|
||||
* @brief Is the node off RBTree.
|
||||
*
|
||||
* This function returns true if the @a node is not on a rbtree. A @a node is
|
||||
* off rbtree if the parent and child fields are set to NULL.
|
||||
* This function returns true if the @a node is not on a rbtree. A @a node is
|
||||
* off rbtree if the parent and child fields are set to NULL.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_node_off_rbtree(
|
||||
const RBTree_Node *node
|
||||
@@ -64,10 +69,14 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_node_off_rbtree(
|
||||
return (node->parent == NULL) && (node->child[RBT_LEFT] == NULL) && (node->child[RBT_RIGHT] == NULL);
|
||||
}
|
||||
|
||||
/** @brief Are Two Nodes Equal
|
||||
/**
|
||||
* @brief Are two Nodes equal.
|
||||
*
|
||||
* This function returns true if @a left and @a right are equal,
|
||||
* and false otherwise.
|
||||
* This function returns true if @a left and @a right are equal,
|
||||
* and false otherwise.
|
||||
*
|
||||
* @retval true @a left and @a right are equal.
|
||||
* @retval false @a left and @a right are not equal.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Are_nodes_equal(
|
||||
const RBTree_Node *left,
|
||||
@@ -77,9 +86,13 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Are_nodes_equal(
|
||||
return left == right;
|
||||
}
|
||||
|
||||
/** @brief Is this RBTree Control Pointer Null
|
||||
/**
|
||||
* @brief Is this RBTree control pointer NULL.
|
||||
*
|
||||
* This function returns true if @a the_rbtree is NULL and false otherwise.
|
||||
* This function returns true if @a the_rbtree is NULL and false otherwise.
|
||||
*
|
||||
* @retval true @a the_rbtree is @c NULL.
|
||||
* @retval false @a the_rbtree is not @c NULL.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_null(
|
||||
const RBTree_Control *the_rbtree
|
||||
@@ -88,9 +101,13 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_null(
|
||||
return (the_rbtree == NULL);
|
||||
}
|
||||
|
||||
/** @brief Is the RBTree Node Pointer NULL
|
||||
/**
|
||||
* @brief Is the RBTree node pointer NUL.
|
||||
*
|
||||
* This function returns true if @a the_node is NULL and false otherwise.
|
||||
* This function returns true if @a the_node is NULL and false otherwise.
|
||||
*
|
||||
* @retval true @a the_node is @c NULL.
|
||||
* @retval false @a the_node is not @c NULL.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_null_node(
|
||||
const RBTree_Node *the_node
|
||||
@@ -100,9 +117,10 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_null_node(
|
||||
}
|
||||
|
||||
|
||||
/** @brief Return pointer to RBTree's root node
|
||||
/**
|
||||
* @brief Return pointer to RBTree's root node.
|
||||
*
|
||||
* This function returns a pointer to the root node of @a the_rbtree.
|
||||
* This function returns a pointer to the root node of @a the_rbtree.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Root(
|
||||
const RBTree_Control *the_rbtree
|
||||
@@ -111,10 +129,11 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Root(
|
||||
return the_rbtree->root;
|
||||
}
|
||||
|
||||
/** @brief Return pointer to RBTree's First node
|
||||
/**
|
||||
* @brief Return pointer to RBTree's first node.
|
||||
*
|
||||
* This function returns a pointer to the first node on @a the_rbtree,
|
||||
* where @a dir specifies whether to return the minimum (0) or maximum (1).
|
||||
* This function returns a pointer to the first node on @a the_rbtree,
|
||||
* where @a dir specifies whether to return the minimum (0) or maximum (1).
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
|
||||
const RBTree_Control *the_rbtree,
|
||||
@@ -124,9 +143,10 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
|
||||
return the_rbtree->first[dir];
|
||||
}
|
||||
|
||||
/** @brief Return pointer to the parent of this node
|
||||
/**
|
||||
* @brief Return pointer to the parent of this node.
|
||||
*
|
||||
* This function returns a pointer to the parent node of @a the_node.
|
||||
* This function returns a pointer to the parent node of @a the_node.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
|
||||
const RBTree_Node *the_node
|
||||
@@ -136,13 +156,14 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
|
||||
return the_node->parent;
|
||||
}
|
||||
|
||||
/** @brief Return pointer to the left of this node
|
||||
/**
|
||||
* @brief Return pointer to the left of this node.
|
||||
*
|
||||
* This function returns a pointer to the left node of this node.
|
||||
* This function returns a pointer to the left node of this node.
|
||||
*
|
||||
* @param[in] the_node is the node to be operated upon.
|
||||
* @param[in] the_node is the node to be operated upon.
|
||||
*
|
||||
* @return This method returns the left node on the rbtree.
|
||||
* @return This method returns the left node on the rbtree.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Left(
|
||||
const RBTree_Node *the_node
|
||||
@@ -151,13 +172,14 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Left(
|
||||
return the_node->child[RBT_LEFT];
|
||||
}
|
||||
|
||||
/** @brief Return pointer to the right of this node
|
||||
/**
|
||||
* @brief Return pointer to the right of this node.
|
||||
*
|
||||
* This function returns a pointer to the right node of this node.
|
||||
* This function returns a pointer to the right node of this node.
|
||||
*
|
||||
* @param[in] the_node is the node to be operated upon.
|
||||
* @param[in] the_node is the node to be operated upon.
|
||||
*
|
||||
* @return This method returns the right node on the rbtree.
|
||||
* @return This method returns the right node on the rbtree.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Right(
|
||||
const RBTree_Node *the_node
|
||||
@@ -166,15 +188,16 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Right(
|
||||
return the_node->child[RBT_RIGHT];
|
||||
}
|
||||
|
||||
/** @brief Is the RBTree Empty
|
||||
/**
|
||||
* @brief Is the RBTree empty.
|
||||
*
|
||||
* This function returns true if there are no nodes on @a the_rbtree and
|
||||
* false otherwise.
|
||||
* This function returns true if there are no nodes on @a the_rbtree and
|
||||
* false otherwise.
|
||||
*
|
||||
* @param[in] the_rbtree is the rbtree to be operated upon.
|
||||
* @param[in] the_rbtree is the rbtree to be operated upon.
|
||||
*
|
||||
* @return This function returns true if there are no nodes on
|
||||
* @a the_rbtree and false otherwise.
|
||||
* @retval true There are no nodes on @a the_rbtree.
|
||||
* @retval false There are nodes on @a the_rbtree.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_empty(
|
||||
const RBTree_Control *the_rbtree
|
||||
@@ -183,11 +206,15 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_empty(
|
||||
return (the_rbtree->root == NULL);
|
||||
}
|
||||
|
||||
/** @brief Is this the First Node on the RBTree
|
||||
/**
|
||||
* @brief Is this the first node on the RBTree.
|
||||
*
|
||||
* This function returns true if @a the_node is the first node on
|
||||
* @a the_rbtree and false otherwise. @a dir specifies whether first means
|
||||
* minimum (0) or maximum (1).
|
||||
* This function returns true if @a the_node is the first node on
|
||||
* @a the_rbtree and false otherwise. @a dir specifies whether first means
|
||||
* minimum (0) or maximum (1).
|
||||
*
|
||||
* @retval true @a the_node is the first node on @a the_rbtree.
|
||||
* @retval false @a the_node is not the first node on @a the_rbtree.
|
||||
*
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_first(
|
||||
@@ -199,9 +226,13 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_first(
|
||||
return (the_node == _RBTree_First(the_rbtree, dir));
|
||||
}
|
||||
|
||||
/** @brief Is this node red?
|
||||
/**
|
||||
* @brief Is this node red.
|
||||
*
|
||||
* This function returns true if @a the_node is red and false otherwise.
|
||||
* This function returns true if @a the_node is red and false otherwise.
|
||||
*
|
||||
* @retval true @a the_node is red.
|
||||
* @retval false @a the_node in not red.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
|
||||
const RBTree_Node *the_node
|
||||
@@ -211,11 +242,14 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
|
||||
}
|
||||
|
||||
|
||||
/** @brief Does this RBTree have only One Node
|
||||
/**
|
||||
* @brief Does this RBTree have only one node.
|
||||
*
|
||||
* This function returns true if there is only one node on @a the_rbtree and
|
||||
* false otherwise.
|
||||
* This function returns true if there is only one node on @a the_rbtree and
|
||||
* false otherwise.
|
||||
*
|
||||
* @retval true @a the_rbtree has only one node.
|
||||
* @retval false @a the_rbtree has more than one nodes.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node(
|
||||
const RBTree_Control *the_rbtree
|
||||
@@ -225,10 +259,14 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node(
|
||||
return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL);
|
||||
}
|
||||
|
||||
/** @brief Is this Node the RBTree root
|
||||
/**
|
||||
* @brief Is this node the RBTree root.
|
||||
*
|
||||
* This function returns true if @a the_node is the root of @a the_rbtree and
|
||||
* false otherwise.
|
||||
* This function returns true if @a the_node is the root of @a the_rbtree and
|
||||
* false otherwise.
|
||||
*
|
||||
* @retval true @a the_node is the root of @a the_rbtree.
|
||||
* @retval false @a the_node is not the root of @a the_rbtree.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_root(
|
||||
const RBTree_Control *the_rbtree,
|
||||
@@ -238,9 +276,10 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_root(
|
||||
return (the_node == _RBTree_Root(the_rbtree));
|
||||
}
|
||||
|
||||
/** @brief Initialize this RBTree as Empty
|
||||
/**
|
||||
* @brief Initialize this RBTree as empty.
|
||||
*
|
||||
* This routine initializes @a the_rbtree to contain zero nodes.
|
||||
* This routine initializes @a the_rbtree to contain zero nodes.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _RBTree_Initialize_empty(
|
||||
RBTree_Control *the_rbtree,
|
||||
@@ -256,11 +295,11 @@ RTEMS_INLINE_ROUTINE void _RBTree_Initialize_empty(
|
||||
the_rbtree->is_unique = is_unique;
|
||||
}
|
||||
|
||||
/** @brief Return a pointer to node's grandparent
|
||||
/**
|
||||
* @brief Return a pointer to node's grandparent.
|
||||
*
|
||||
* This function returns a pointer to the grandparent of @a the_node if it
|
||||
* exists, and NULL if not.
|
||||
*
|
||||
* This function returns a pointer to the grandparent of @a the_node if it
|
||||
* exists, and NULL if not.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Grandparent(
|
||||
const RBTree_Node *the_node
|
||||
@@ -273,10 +312,11 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Grandparent(
|
||||
return(the_node->parent->parent);
|
||||
}
|
||||
|
||||
/** @brief Return a pointer to node's sibling
|
||||
/**
|
||||
* @brief Return a pointer to node's sibling.
|
||||
*
|
||||
* This function returns a pointer to the sibling of @a the_node if it
|
||||
* exists, and NULL if not.
|
||||
* This function returns a pointer to the sibling of @a the_node if it
|
||||
* exists, and NULL if not.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
|
||||
const RBTree_Node *the_node
|
||||
@@ -292,10 +332,11 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
|
||||
return the_node->parent->child[RBT_LEFT];
|
||||
}
|
||||
|
||||
/** @brief Return a pointer to node's parent's sibling
|
||||
/**
|
||||
* @brief Return a pointer to node's parent's sibling.
|
||||
*
|
||||
* This function returns a pointer to the sibling of the parent of
|
||||
* @a the_node if it exists, and NULL if not.
|
||||
* This function returns a pointer to the sibling of the parent of
|
||||
* @a the_node if it exists, and NULL if not.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent_sibling(
|
||||
const RBTree_Node *the_node
|
||||
@@ -307,10 +348,11 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent_sibling(
|
||||
return _RBTree_Sibling(the_node->parent);
|
||||
}
|
||||
|
||||
/** @brief Find the RBTree_Control header given a node in the tree
|
||||
/**
|
||||
* @brief Find the RBTree_Control header given a node in the tree.
|
||||
*
|
||||
* This function returns a pointer to the header of the Red Black
|
||||
* Tree containing @a the_node if it exists, and NULL if not.
|
||||
* This function returns a pointer to the header of the Red Black
|
||||
* Tree containing @a the_node if it exists, and NULL if not.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected(
|
||||
RBTree_Node *the_node
|
||||
@@ -344,8 +386,8 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_lesser(
|
||||
/**
|
||||
* @brief Returns the predecessor of a node.
|
||||
*
|
||||
* @param[in] rbtree The red-black tree.
|
||||
* @param[in] node The node.
|
||||
* @param[in] rbtree is the red-black tree.
|
||||
* @param[in] node is the node.
|
||||
*
|
||||
* @retval NULL The predecessor does not exist.
|
||||
* @retval otherwise The predecessor node.
|
||||
@@ -372,8 +414,8 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor(
|
||||
/**
|
||||
* @brief Returns the successor of a node.
|
||||
*
|
||||
* @param[in] rbtree The red-black tree.
|
||||
* @param[in] node The node.
|
||||
* @param[in] rbtree is the red-black tree.
|
||||
* @param[in] node is the node.
|
||||
*
|
||||
* @retval NULL The successor does not exist.
|
||||
* @retval otherwise The successor node.
|
||||
@@ -397,18 +439,19 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor(
|
||||
return _RBTree_Next( node, RBT_RIGHT );
|
||||
}
|
||||
|
||||
/** @brief Get the First Node (unprotected)
|
||||
/**
|
||||
* @brief Get the first node (unprotected).
|
||||
*
|
||||
* This function removes the minimum or maximum node from the_rbtree and
|
||||
* returns a pointer to that node. It does NOT disable interrupts to ensure
|
||||
* the atomicity of the get operation.
|
||||
* This function removes the minimum or maximum node from the_rbtree and
|
||||
* returns a pointer to that node. It does NOT disable interrupts to ensure
|
||||
* the atomicity of the get operation.
|
||||
*
|
||||
* @param[in] the_rbtree is the rbtree to attempt to get the min node from.
|
||||
* @param[in] dir specifies whether to get minimum (0) or maximum (1)
|
||||
* @param[in] the_rbtree is the rbtree to attempt to get the min node from.
|
||||
* @param[in] dir specifies whether to get minimum (0) or maximum (1)
|
||||
*
|
||||
* @return This method returns the min or max node on the rbtree, or NULL.
|
||||
* @return This method returns the min or max node on the rbtree, or NULL.
|
||||
*
|
||||
* @note This routine may return NULL if the RBTree is empty.
|
||||
* @note This routine may return NULL if the RBTree is empty.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Get_unprotected(
|
||||
RBTree_Control *the_rbtree,
|
||||
@@ -420,10 +463,11 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Get_unprotected(
|
||||
return the_node;
|
||||
}
|
||||
|
||||
/** @brief Rotate the_node in the direction passed as second argument
|
||||
*
|
||||
* This routine rotates @a the_node to the direction @a dir, swapping
|
||||
* @a the_node with its child\[@a dir\].
|
||||
/**
|
||||
* @brief Rotate the_node in the direction passed as second argument.
|
||||
*
|
||||
* This routine rotates @a the_node to the direction @a dir, swapping
|
||||
* @a the_node with its child\[@a dir\].
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _RBTree_Rotate(
|
||||
RBTree_Node *the_node,
|
||||
@@ -448,7 +492,8 @@ RTEMS_INLINE_ROUTINE void _RBTree_Rotate(
|
||||
the_node->parent = c;
|
||||
}
|
||||
|
||||
/** @brief Determines whether the tree is unique
|
||||
/**
|
||||
* @brief Determines whether the tree is unique.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_unique(
|
||||
const RBTree_Control *the_rbtree
|
||||
@@ -456,7 +501,8 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_unique(
|
||||
{
|
||||
return( the_rbtree && the_rbtree->is_unique );
|
||||
}
|
||||
/**@}*/
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* @file rtems/score/schedulerpriority.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This inline file contains all of the inlined routines associated with
|
||||
* the manipulation of the priority-based scheduling structures.
|
||||
* @brief Inlined Routines Associated with the Manipulation of the
|
||||
* Priority-Based Scheduling Structures
|
||||
*
|
||||
* This inline file contains all of the inlined routines associated with
|
||||
* the manipulation of the priority-based scheduling structures.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -24,13 +27,15 @@
|
||||
#include <rtems/score/wkspace.h>
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreScheduler
|
||||
* @addtogroup ScoreScheduler
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @brief Scheduler priority Ready queue initialize
|
||||
/**
|
||||
* @brief Ready queue initialization.
|
||||
*
|
||||
* This routine initializes @a the_ready_queue for priority-based scheduling.
|
||||
* This routine initializes @a the_ready_queue for priority-based scheduling.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(void)
|
||||
{
|
||||
@@ -49,11 +54,11 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_priority_Ready_queue_enqueue
|
||||
* @brief Put a thread to the ready queue.
|
||||
*
|
||||
* This routine puts @a the_thread on to the priority-based ready queue.
|
||||
*
|
||||
* @param[in] the_thread - pointer to thread
|
||||
* This routine puts @a the_thread on to the priority-based ready queue.
|
||||
*
|
||||
* @param[in] the_thread is a pointer to the thread
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
|
||||
Thread_Control *the_thread
|
||||
@@ -66,18 +71,18 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
|
||||
ready = sched_info->ready_chain;
|
||||
|
||||
_Priority_bit_map_Add( &sched_info->Priority_map );
|
||||
|
||||
|
||||
_Chain_Append_unprotected( ready, &the_thread->Object.Node );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_priority_Ready_queue_Enqueue_first
|
||||
* @brief Put a thread to the head of the ready queue.
|
||||
*
|
||||
* This routine puts @a the_thread to the head of the ready queue.
|
||||
* For priority-based ready queues, the thread will be the first thread
|
||||
* at its priority level.
|
||||
*
|
||||
* @param[in] the_thread - pointer to thread
|
||||
* This routine puts @a the_thread to the head of the ready queue.
|
||||
* For priority-based ready queues, the thread will be the first thread
|
||||
* at its priority level.
|
||||
*
|
||||
* @param[in] the_thread is a pointer to the thread.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
|
||||
Thread_Control *the_thread
|
||||
@@ -96,12 +101,12 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_priority_Ready_queue_extract
|
||||
* @brief Remove a specific thread from the ready queue.
|
||||
*
|
||||
* This routine removes a specific thread from the specified
|
||||
* priority-based ready queue.
|
||||
* This routine removes a specific thread from the specified
|
||||
* priority-based ready queue.
|
||||
*
|
||||
* @param[in] the_thread - pointer to thread
|
||||
* @param[in] the_thread is a pointer to the thread.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
|
||||
Thread_Control *the_thread
|
||||
@@ -122,13 +127,13 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_priority_Ready_queue_first
|
||||
* @brief Return a pointer to the first thread.
|
||||
*
|
||||
* This routines returns a pointer to the first thread on @a the_ready_queue.
|
||||
* This routines returns a pointer to the first thread on @a the_ready_queue.
|
||||
*
|
||||
* @param[in] the_ready_queue - pointer to thread queue
|
||||
* @param[in] the_ready_queue - pointer to thread queue
|
||||
*
|
||||
* @return This method returns the first thread or NULL
|
||||
* @return This method returns the first thread or NULL
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
|
||||
Chain_Control *the_ready_queue
|
||||
@@ -143,12 +148,12 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_priority_Ready_queue_requeue
|
||||
* @brief Requeue a thread on the ready queue.
|
||||
*
|
||||
* This routine is invoked when a thread changes priority and should be
|
||||
* moved to a different position on the ready queue.
|
||||
* This routine is invoked when a thread changes priority and should be
|
||||
* moved to a different position on the ready queue.
|
||||
*
|
||||
* @param[in] the_thread - pointer to thread
|
||||
* @param[in] the_thread is a pointer to the thread
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_requeue(
|
||||
Thread_Control *the_thread
|
||||
@@ -162,19 +167,17 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_requeue(
|
||||
_Chain_Extract_unprotected( &the_thread->Object.Node );
|
||||
|
||||
_Chain_Append_unprotected(
|
||||
sched_info->ready_chain,
|
||||
sched_info->ready_chain,
|
||||
&the_thread->Object.Node
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief _Scheduler_priority_Schedule_body
|
||||
* @brief Scheduling decision logic.
|
||||
*
|
||||
* This kernel routine implements scheduling decision logic
|
||||
* for priority-based scheduling.
|
||||
*
|
||||
* @param[in] the_thread - pointer to thread
|
||||
* This kernel routine implements scheduling decision logic
|
||||
* for priority-based scheduling.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
|
||||
{
|
||||
@@ -184,12 +187,12 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Scheduler priority Priority compare body
|
||||
* @brief Priority comparison.
|
||||
*
|
||||
* This routine implements priority comparison for priority-based
|
||||
* scheduling.
|
||||
* This routine implements priority comparison for priority-based
|
||||
* scheduling.
|
||||
*
|
||||
* @return >0 for higher priority, 0 for equal and <0 for lower priority.
|
||||
* @return >0 for higher priority, 0 for equal and <0 for lower priority.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE int _Scheduler_priority_Priority_compare_body(
|
||||
Priority_Control p1,
|
||||
@@ -200,7 +203,7 @@ RTEMS_INLINE_ROUTINE int _Scheduler_priority_Priority_compare_body(
|
||||
return ( p2 - p1 );
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* @file rtems/score/schedulersimple.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This inline file contains all of the inlined routines associated with
|
||||
* the manipulation of the priority-based scheduling structures.
|
||||
* @brief Inlined Routines Associated with the Manipulation of the
|
||||
* Priority-Based Scheduling Structures
|
||||
*
|
||||
* This inline file contains all of the inlined routines associated with
|
||||
* the manipulation of the priority-based scheduling structures.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -23,15 +26,16 @@
|
||||
#include <rtems/score/thread.h>
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreScheduler
|
||||
* @addtogroup ScoreScheduler
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* This routine puts @a the_thread on to the ready queue.
|
||||
* This routine puts @a the_thread on to the ready queue.
|
||||
*
|
||||
* @param[in] the_ready_queue is a pointer to the ready queue head
|
||||
* @param[in] the_thread is the thread to be blocked
|
||||
* @param[in] the_ready_queue is a pointer to the ready queue head
|
||||
* @param[in] the_thread is the thread to be blocked
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_simple_Ready_queue_requeue(
|
||||
Scheduler_Control *the_ready_queue,
|
||||
@@ -45,7 +49,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_simple_Ready_queue_requeue(
|
||||
_Scheduler_simple_Ready_queue_enqueue( the_thread );
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/threadmp.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This include file contains the bodies of all inlined routines
|
||||
* for the multiprocessing part of thread package.
|
||||
* @brief Inlined Routines for the Multiprocessing part of Thread Package
|
||||
*
|
||||
* This include file contains the bodies of all inlined routines
|
||||
* for the multiprocessing part of thread package.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -24,23 +26,24 @@
|
||||
#define _RTEMS_SCORE_THREADMP_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreThreadMP
|
||||
* @{
|
||||
* @addtogroup ScoreThreadMP
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* This function returns true if the thread in question is the
|
||||
* multiprocessing receive thread.
|
||||
* This function returns true if the thread in question is the
|
||||
* multiprocessing receive thread.
|
||||
*
|
||||
* @note This is a macro to avoid needing a prototype for
|
||||
* _MPCI_Receive_server_tcb until it is used.
|
||||
* @note This is a macro to avoid needing a prototype for
|
||||
* _MPCI_Receive_server_tcb until it is used.
|
||||
*/
|
||||
#define _Thread_MP_Is_receive(_the_thread) \
|
||||
((_the_thread) == _MPCI_Receive_server_tcb)
|
||||
|
||||
/**
|
||||
* This routine frees a proxy control block to the
|
||||
* inactive chain of free proxy control blocks.
|
||||
* This routine frees a proxy control block to the
|
||||
* inactive chain of free proxy control blocks.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy (
|
||||
@@ -56,7 +59,7 @@ RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy (
|
||||
_Chain_Append( &_Thread_MP_Inactive_proxies, &the_thread->Object.Node );
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/threadq.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This inline file contains all of the inlined routines associated with
|
||||
* the manipulation of thread queues.
|
||||
* @brief Inlined Routines Associated with the Manipulation of Thread Queues
|
||||
*
|
||||
* This inline file contains all of the inlined routines associated with
|
||||
* the manipulation of thread queues.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -24,11 +26,12 @@
|
||||
#include <rtems/score/thread.h>
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreThreadQ
|
||||
* @addtogroup ScoreThreadQ
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/watchdog.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This file contains the static inline implementation of all inlined
|
||||
* routines in the Watchdog Handler.
|
||||
* @brief Inlined Routines in the Watchdog Handler
|
||||
*
|
||||
* This file contains the static inline implementation of all inlined
|
||||
* routines in the Watchdog Handler.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -22,14 +24,14 @@
|
||||
#define _RTEMS_SCORE_WATCHDOG_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreWatchdog
|
||||
* @addtogroup ScoreWatchdog
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* This routine initializes the specified watchdog. The watchdog is
|
||||
* made inactive, the watchdog id and handler routine are set to the
|
||||
* specified values.
|
||||
* This routine initializes the specified watchdog. The watchdog is
|
||||
* made inactive, the watchdog id and handler routine are set to the
|
||||
* specified values.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Initialize(
|
||||
@@ -46,8 +48,8 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Initialize(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine returns true if the watchdog timer is in the ACTIVE
|
||||
* state, and false otherwise.
|
||||
* This routine returns true if the watchdog timer is in the ACTIVE
|
||||
* state, and false otherwise.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_active(
|
||||
@@ -60,8 +62,8 @@ RTEMS_INLINE_ROUTINE bool _Watchdog_Is_active(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine activates THE_WATCHDOG timer which is already
|
||||
* on a watchdog chain.
|
||||
* This routine activates THE_WATCHDOG timer which is already
|
||||
* on a watchdog chain.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
|
||||
@@ -74,8 +76,8 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine deactivates THE_WATCHDOG timer which will remain
|
||||
* on a watchdog chain.
|
||||
* This routine deactivates THE_WATCHDOG timer which will remain
|
||||
* on a watchdog chain.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
|
||||
@@ -88,8 +90,8 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine is invoked at each clock tick to update the ticks
|
||||
* watchdog chain.
|
||||
* This routine is invoked at each clock tick to update the ticks
|
||||
* watchdog chain.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
|
||||
@@ -100,8 +102,8 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine is invoked at each clock tick to update the seconds
|
||||
* watchdog chain.
|
||||
* This routine is invoked at each clock tick to update the seconds
|
||||
* watchdog chain.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
|
||||
@@ -112,10 +114,10 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine inserts THE_WATCHDOG into the ticks watchdog chain
|
||||
* for a time of UNITS ticks. The INSERT_MODE indicates whether
|
||||
* THE_WATCHDOG is to be activated automatically or later, explicitly
|
||||
* by the caller.
|
||||
* This routine inserts THE_WATCHDOG into the ticks watchdog chain
|
||||
* for a time of UNITS ticks. The INSERT_MODE indicates whether
|
||||
* THE_WATCHDOG is to be activated automatically or later, explicitly
|
||||
* by the caller.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Insert_ticks(
|
||||
@@ -131,10 +133,10 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Insert_ticks(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine inserts THE_WATCHDOG into the seconds watchdog chain
|
||||
* for a time of UNITS seconds. The INSERT_MODE indicates whether
|
||||
* THE_WATCHDOG is to be activated automatically or later, explicitly
|
||||
* by the caller.
|
||||
* This routine inserts THE_WATCHDOG into the seconds watchdog chain
|
||||
* for a time of UNITS seconds. The INSERT_MODE indicates whether
|
||||
* THE_WATCHDOG is to be activated automatically or later, explicitly
|
||||
* by the caller.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds(
|
||||
@@ -150,9 +152,9 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine adjusts the seconds watchdog chain in the forward
|
||||
* or backward DIRECTION for UNITS seconds. This is invoked when the
|
||||
* current time of day is changed.
|
||||
* This routine adjusts the seconds watchdog chain in the forward
|
||||
* or backward DIRECTION for UNITS seconds. This is invoked when the
|
||||
* current time of day is changed.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_seconds(
|
||||
@@ -166,8 +168,8 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_seconds(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine adjusts the ticks watchdog chain in the forward
|
||||
* or backward DIRECTION for UNITS ticks.
|
||||
* This routine adjusts the ticks watchdog chain in the forward
|
||||
* or backward DIRECTION for UNITS ticks.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_ticks(
|
||||
@@ -181,10 +183,10 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_ticks(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine resets THE_WATCHDOG timer to its state at INSERT
|
||||
* time. This routine is valid only on interval watchdog timers
|
||||
* and is used to make an interval watchdog timer fire "every" so
|
||||
* many ticks.
|
||||
* This routine resets THE_WATCHDOG timer to its state at INSERT
|
||||
* time. This routine is valid only on interval watchdog timers
|
||||
* and is used to make an interval watchdog timer fire "every" so
|
||||
* many ticks.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
|
||||
@@ -199,8 +201,8 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine returns a pointer to the watchdog timer following
|
||||
* THE_WATCHDOG on the watchdog chain.
|
||||
* This routine returns a pointer to the watchdog timer following
|
||||
* THE_WATCHDOG on the watchdog chain.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
|
||||
@@ -213,8 +215,8 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine returns a pointer to the watchdog timer preceding
|
||||
* THE_WATCHDOG on the watchdog chain.
|
||||
* This routine returns a pointer to the watchdog timer preceding
|
||||
* THE_WATCHDOG on the watchdog chain.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Previous(
|
||||
@@ -227,8 +229,8 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Previous(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine returns a pointer to the first watchdog timer
|
||||
* on the watchdog chain HEADER.
|
||||
* This routine returns a pointer to the first watchdog timer
|
||||
* on the watchdog chain HEADER.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
|
||||
@@ -241,8 +243,8 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine returns a pointer to the last watchdog timer
|
||||
* on the watchdog chain HEADER.
|
||||
* This routine returns a pointer to the last watchdog timer
|
||||
* on the watchdog chain HEADER.
|
||||
*/
|
||||
|
||||
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last(
|
||||
@@ -254,7 +256,7 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last(
|
||||
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* @file rtems/score/wkspace.inl
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This include file contains the bodies of the routines which contains
|
||||
* information related to the RAM Workspace.
|
||||
* @brief Inlined Routines Associated with the RAM Workspace
|
||||
*
|
||||
* This include file contains the bodies of the routines which contains
|
||||
* information related to the RAM Workspace.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -22,11 +24,12 @@
|
||||
#define _RTEMS_SCORE_WKSPACE_INL
|
||||
|
||||
/**
|
||||
* @addtogroup ScoreWorkspace
|
||||
* @addtogroup ScoreWorkspace
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**@}*/
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
Reference in New Issue
Block a user