2011-06-17 Joel Sherrill <joel.sherrill@oarcorp.com>

* libcsupport/include/rtems/malloc.h, libmisc/stackchk/stackchk.h,
	posix/include/rtems/posix/time.h, rtems/include/rtems/rtems/object.h,
	score/include/rtems/score/apiext.h,
	score/include/rtems/score/interr.h, score/include/rtems/score/mpci.h,
	score/include/rtems/score/objectmp.h,
	score/include/rtems/score/thread.h,
	score/include/rtems/score/threadmp.h,
	score/include/rtems/score/threadq.h,
	score/include/rtems/score/timespec.h,
	score/include/rtems/score/timestamp.h,
	score/include/rtems/score/timestamp64.h,
	score/include/rtems/score/tod.h,
	score/include/rtems/score/watchdog.h,
	score/include/rtems/score/wkspace.h: Make @brief formatting more
	consistent.
	* score/include/rtems/score/rbtree.h: Also reformat.
This commit is contained in:
Joel Sherrill
2011-06-17 14:55:27 +00:00
parent 3203e09507
commit 4b72da419b
19 changed files with 564 additions and 397 deletions

View File

@@ -1,3 +1,22 @@
2011-06-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/include/rtems/malloc.h, libmisc/stackchk/stackchk.h,
posix/include/rtems/posix/time.h, rtems/include/rtems/rtems/object.h,
score/include/rtems/score/apiext.h,
score/include/rtems/score/interr.h, score/include/rtems/score/mpci.h,
score/include/rtems/score/objectmp.h,
score/include/rtems/score/thread.h,
score/include/rtems/score/threadmp.h,
score/include/rtems/score/threadq.h,
score/include/rtems/score/timespec.h,
score/include/rtems/score/timestamp.h,
score/include/rtems/score/timestamp64.h,
score/include/rtems/score/tod.h,
score/include/rtems/score/watchdog.h,
score/include/rtems/score/wkspace.h: Make @brief formatting more
consistent.
* score/include/rtems/score/rbtree.h: Also reformat.
2011-06-17 Joel Sherrill <joel.sherrill@oarcorp.com> 2011-06-17 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1819/cpukit PR 1819/cpukit

View File

@@ -5,7 +5,7 @@
/* /*
* RTEMS Malloc Extensions * RTEMS Malloc Extensions
* *
* COPYRIGHT (c) 1989-2007. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may in * The license and distribution terms for this file may in
@@ -72,7 +72,8 @@ extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers;
typedef void (*rtems_malloc_dirtier_t)(void *, size_t); typedef void (*rtems_malloc_dirtier_t)(void *, size_t);
extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper; extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper;
/** @brief Dirty memory function /**
* @brief Dirty memory function
* *
* This method fills the specified area with a non-zero pattern * This method fills the specified area with a non-zero pattern
* to aid in debugging programs which do not initialize their * to aid in debugging programs which do not initialize their
@@ -83,7 +84,8 @@ void rtems_malloc_dirty_memory(
size_t size size_t size
); );
/** @brief Print Malloc Statistic Usage Report /**
* @brief Print Malloc Statistic Usage Report
* *
* This method fills in the called provided malloc statistics area. * This method fills in the called provided malloc statistics area.
* *
@@ -93,7 +95,8 @@ int malloc_get_statistics(
rtems_malloc_statistics_t *stats rtems_malloc_statistics_t *stats
); );
/** @brief Print Malloc Statistic Usage Report /**
* @brief Print Malloc Statistic Usage Report
* *
* This method prints a malloc statistics report. * This method prints a malloc statistics report.
* *
@@ -101,7 +104,8 @@ int malloc_get_statistics(
*/ */
void malloc_report_statistics(void); void malloc_report_statistics(void);
/** @brief Print Malloc Statistic Usage Report /**
* @brief Print Malloc Statistic Usage Report
* *
* This method prints a malloc statistics report. * This method prints a malloc statistics report.
* *
@@ -116,6 +120,7 @@ void malloc_report_statistics_with_plugin(
); );
/** /**
* @brief RTEMS variation on Aligned Memory Allocation
* *
* This method is a help memalign implementation which does all * This method is a help memalign implementation which does all
* error checking done by posix_memalign() EXCEPT it does NOT * error checking done by posix_memalign() EXCEPT it does NOT

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2007. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -27,7 +27,8 @@
extern "C" { extern "C" {
#endif #endif
/** @brief Has Current Task Blown Its Stack /**
* @brief Has Current Task Blown Its Stack
* *
* This method is used to determine if the current stack pointer * This method is used to determine if the current stack pointer
* of the currently executing task is within bounds. * of the currently executing task is within bounds.
@@ -38,7 +39,8 @@ extern "C" {
*/ */
bool rtems_stack_checker_is_blown( void ); bool rtems_stack_checker_is_blown( void );
/** @brief Print Stack Usage Report /**
* @brief Print Stack Usage Report
* *
* This method prints a stack usage report for the curently executing * This method prints a stack usage report for the curently executing
* task. * task.
@@ -47,7 +49,8 @@ bool rtems_stack_checker_is_blown( void );
*/ */
void rtems_stack_checker_report_usage( void ); void rtems_stack_checker_report_usage( void );
/** @brief Print Stack Usage Report /**
* @brief Print Stack Usage Report
* *
* This method prints a stack usage report for the curently executing * This method prints a stack usage report for the curently executing
* task. * task.
@@ -68,7 +71,8 @@ void rtems_stack_checker_report_usage_with_plugin(
************************************************************* *************************************************************
*************************************************************/ *************************************************************/
/** @brief Stack Checker Task Create Extension /**
* @brief Stack Checker Task Create Extension
* *
* This method is the task create extension for the stack checker. * This method is the task create extension for the stack checker.
* *
@@ -83,7 +87,8 @@ bool rtems_stack_checker_create_extension(
Thread_Control *the_thread Thread_Control *the_thread
); );
/** @brief Stack Checker Task Begin Extension /**
* @brief Stack Checker Task Begin Extension
* *
* This method is the task begin extension for the stack checker. * This method is the task begin extension for the stack checker.
* *
@@ -95,7 +100,8 @@ void rtems_stack_checker_begin_extension(
Thread_Control *the_thread Thread_Control *the_thread
); );
/** @brief Stack Checker Task Context Switch Extension /**
* @brief Stack Checker Task Context Switch Extension
* *
* This method is the task context switch extension for the stack checker. * This method is the task context switch extension for the stack checker.
* *
@@ -110,7 +116,8 @@ void rtems_stack_checker_switch_extension(
Thread_Control *heir Thread_Control *heir
); );
/** @brief Stack Checker Extension Set Definition /**
* @brief Stack Checker Extension Set Definition
* *
* This macro defines the user extension handler set for the stack * This macro defines the user extension handler set for the stack
* checker. This macro is normally only used by confdefs.h. * checker. This macro is normally only used by confdefs.h.

View File

@@ -3,7 +3,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -19,7 +19,8 @@
#include <rtems/score/timespec.h> #include <rtems/score/timespec.h>
#include <rtems/score/watchdog.h> #include <rtems/score/watchdog.h>
/** @brief Absolute Timeout Conversion Results /**
* @brief Absolute Timeout Conversion Results
* *
* This enumeration defines the possible results of converting * This enumeration defines the possible results of converting
* an absolute time used for timeouts to POSIX blocking calls to * an absolute time used for timeouts to POSIX blocking calls to

View File

@@ -2,7 +2,7 @@
* @file rtems/rtems/object.h * @file rtems/rtems/object.h
*/ */
/* COPYRIGHT (c) 1989-2008. /* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -88,7 +88,8 @@ typedef struct {
#define rtems_build_name( _C1, _C2, _C3, _C4 ) \ #define rtems_build_name( _C1, _C2, _C3, _C4 ) \
_Objects_Build_name( _C1, _C2, _C3, _C4 ) _Objects_Build_name( _C1, _C2, _C3, _C4 )
/** @brief Obtain name of object /**
* @brief Obtain name of object
* *
* This directive returns the name associated with the specified * This directive returns the name associated with the specified
* object ID. * object ID.

View File

@@ -91,13 +91,15 @@ typedef struct {
*/ */
SCORE_EXTERN Chain_Control _API_extensions_List; SCORE_EXTERN Chain_Control _API_extensions_List;
/** @brief Initialize the API Extensions Handler /**
* @brief Initialize the API Extensions Handler
* *
* This routine initializes the API extension handler. * This routine initializes the API extension handler.
*/ */
void _API_extensions_Initialization( void ); void _API_extensions_Initialization( void );
/** @brief Add Extension Set to the Active Set /**
* @brief Add Extension Set to the Active Set
* *
* This routine adds an extension to the active set of API extensions. * This routine adds an extension to the active set of API extensions.
* *
@@ -108,20 +110,23 @@ void _API_extensions_Add(
); );
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
/** @brief Execute all Pre-Driver Extensions /**
* @brief Execute all Pre-Driver Extensions
* *
* This routine executes all of the predriver callouts. * This routine executes all of the predriver callouts.
*/ */
void _API_extensions_Run_predriver( void ); void _API_extensions_Run_predriver( void );
#endif #endif
/** @brief Execute all Post-Driver Extensions /**
* @brief Execute all Post-Driver Extensions
* *
* This routine executes all of the postdriver callouts. * This routine executes all of the postdriver callouts.
*/ */
void _API_extensions_Run_postdriver( void ); void _API_extensions_Run_postdriver( void );
/** @brief Execute all Post Context Switch Extensions /**
* @brief Execute all Post Context Switch Extensions
* *
* This routine executes all of the post context switch callouts. * This routine executes all of the post context switch callouts.
*/ */

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2007. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -94,7 +94,8 @@ typedef struct {
*/ */
SCORE_EXTERN Internal_errors_Information _Internal_errors_What_happened; SCORE_EXTERN Internal_errors_Information _Internal_errors_What_happened;
/** @brief Internal error Occurred /**
* @brief Internal error Occurred
* *
* This routine is invoked when the application or the executive itself * This routine is invoked when the application or the executive itself
* determines that a fatal error has occurred. * determines that a fatal error has occurred.

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -179,7 +179,8 @@ SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
*/ */
SCORE_EXTERN MPCI_Control *_MPCI_table; SCORE_EXTERN MPCI_Control *_MPCI_table;
/** @brief Pointer to MP Thread Control Block /**
* @brief Pointer to MP Thread Control Block
* *
* The following is used to determine when the multiprocessing receive * The following is used to determine when the multiprocessing receive
* thread is executing so that a proxy can be allocated instead of * thread is executing so that a proxy can be allocated instead of

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2006. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -46,21 +46,24 @@ typedef struct {
uint32_t name; uint32_t name;
} Objects_MP_Control; } Objects_MP_Control;
/** @brief Objects MP Handler initialization /**
* @brief Objects MP Handler initialization
* *
* This routine intializes the inactive global object chain * This routine intializes the inactive global object chain
* based on the maximum number of global objects configured. * based on the maximum number of global objects configured.
*/ */
void _Objects_MP_Handler_initialization(void); void _Objects_MP_Handler_initialization(void);
/** @brief Objects MP Handler Early initialization /**
* @brief Objects MP Handler Early initialization
* *
* This routine intializes the global object node number * This routine intializes the global object node number
* used in the ID field of all objects. * used in the ID field of all objects.
*/ */
void _Objects_MP_Handler_early_initialization(void); void _Objects_MP_Handler_early_initialization(void);
/** @brief Objects MP Open /**
* @brief Objects MP Open
* *
* This routine place the specified global object in the * This routine place the specified global object in the
* specified information table. * specified information table.
@@ -81,7 +84,8 @@ void _Objects_MP_Open (
Objects_Id the_id Objects_Id the_id
); );
/** @brief Objects MP Allocate and open /**
* @brief Objects MP Allocate and open
* *
* This routine allocates a global object control block * This routine allocates a global object control block
* and places it in the specified information table. If the * and places it in the specified information table. If the
@@ -105,7 +109,8 @@ bool _Objects_MP_Allocate_and_open (
bool is_fatal_error bool is_fatal_error
); );
/** @brief Objects MP Close /**
* @brief Objects MP Close
* *
* This routine removes a global object from the specified * This routine removes a global object from the specified
* information table and deallocates the global object control block. * information table and deallocates the global object control block.
@@ -115,7 +120,8 @@ void _Objects_MP_Close (
Objects_Id the_id Objects_Id the_id
); );
/** @brief Objects MP Global name search /**
* @brief Objects MP Global name search
* *
* This routine looks for the object with the_name in the global * This routine looks for the object with the_name in the global
* object tables indicated by information. It returns the ID of the * object tables indicated by information. It returns the ID of the
@@ -138,7 +144,8 @@ Objects_Name_or_id_lookup_errors _Objects_MP_Global_name_search (
Objects_Id *the_id Objects_Id *the_id
); );
/** @brief Objects MP Is remote /**
* @brief Objects MP Is remote
* *
* This function searches the Global Object Table managed * This function searches the Global Object Table managed
* by information for the object indicated by ID. If the object * by information for the object indicated by ID. If the object

View File

@@ -1,4 +1,3 @@
/** /**
* @file rtems/score/rbtree.h * @file rtems/score/rbtree.h
* *
@@ -36,260 +35,260 @@ extern "C" {
#include <rtems/score/address.h> #include <rtems/score/address.h>
/** /**
* @typedef RBTree_Node * @typedef RBTree_Node
* *
* This type definition promotes the name for the RBTree Node used by * This type definition promotes the name for the RBTree Node used by
* all RTEMS code. It is a separate type definition because a forward * all RTEMS code. It is a separate type definition because a forward
* reference is required to define it. See @ref RBTree_Node_struct for * reference is required to define it. See @ref RBTree_Node_struct for
* detailed information. * detailed information.
*/ */
typedef struct RBTree_Node_struct RBTree_Node; typedef struct RBTree_Node_struct RBTree_Node;
/** /**
* This enum type defines the colors available for the RBTree Nodes * This enum type defines the colors available for the RBTree Nodes
*/ */
typedef enum { typedef enum {
RBT_BLACK, RBT_BLACK,
RBT_RED RBT_RED
} RBTree_Color; } RBTree_Color;
/** /**
* @struct RBTree_Node_struct * @struct RBTree_Node_struct
* *
* This is used to manage each element (node) which is placed * This is used to manage each element (node) which is placed
* on a RBT. * on a RBT.
* *
* @note Typically, a more complicated structure will use the * @note Typically, a more complicated structure will use the
* rbtree package. The more complicated structure will * rbtree package. The more complicated structure will
* include a rbtree node as the first element in its * include a rbtree node as the first element in its
* control structure. It will then call the rbtree package * control structure. It will then call the rbtree package
* with a pointer to that node element. The node pointer * with a pointer to that node element. The node pointer
* and the higher level structure start at the same address * and the higher level structure start at the same address
* so the user can cast the pointers back and forth. * so the user can cast the pointers back and forth.
* *
*/ */
struct RBTree_Node_struct { struct RBTree_Node_struct {
/** This points to the node's parent */ /** This points to the node's parent */
RBTree_Node *parent; RBTree_Node *parent;
/** child[0] points to the left child, child[1] points to the right child */ /** child[0] points to the left child, child[1] points to the right child */
RBTree_Node *child[2]; RBTree_Node *child[2];
/** This is the integer value stored by this node, used for sorting */ /** This is the integer value stored by this node, used for sorting */
unsigned int value; unsigned int value;
/** The color of the node. Either red or black */ /** The color of the node. Either red or black */
RBTree_Color color; RBTree_Color color;
}; };
/**
* @brief macro to return the structure containing the @a node.
*
* This macro returns a pointer of type @a container_type that points
* to the structure containing @a node, where @a node_field_name is the
* field name of the RBTree_Node structure in @a container_type.
*
*/
/**
* @brief macro to return the structure containing the @a node.
*
* This macro returns a pointer of type @a container_type that points
* to the structure containing @a node, where @a node_field_name is the
* field name of the RBTree_Node structure in @a container_type.
*
*/
#define _RBTree_Container_of(node,container_type, node_field_name) \ #define _RBTree_Container_of(node,container_type, node_field_name) \
((container_type*) \ ((container_type*) \
((size_t)node - ((size_t)(&((container_type *)0)->node_field_name)))) ((size_t)node - ((size_t)(&((container_type *)0)->node_field_name))))
/**
* This type indicates the direction.
*/
typedef enum {
RBT_LEFT=0,
RBT_RIGHT=1
} RBTree_Direction;
typedef enum { /**
RBT_LEFT=0, * @struct RBTree_Control
RBT_RIGHT=1 *
} RBTree_Direction; * This is used to manage a RBT. A rbtree consists of a tree of zero or more
* nodes.
*
* @note This implementation does not require special checks for
* manipulating the root element of the RBT.
* To accomplish this the @a RBTree_Control structure can be overlaid
* with a @ref RBTree_Node structure to act as a "dummy root",
* which has a NULL parent and its left child is the root.
*/
/** /* the RBTree_Control is actually part of the RBTree structure as an
* @struct RBTree_Control * RBTree_Node. The mapping of fields from RBTree_Control to RBTree_Node are:
* * permanent_null == parent
* This is used to manage a RBT. A rbtree consists of a tree of zero or more * root == left
* nodes. * first[0] == right
* */
* @note This implementation does not require special checks for typedef struct {
* manipulating the root element of the RBT. /** This points to a NULL. Useful for finding the root. */
* To accomplish this the @a RBTree_Control structure can be overlaid RBTree_Node *permanent_null;
* with a @ref RBTree_Node structure to act as a "dummy root", /** This points to the root node of the RBT. */
* which has a NULL parent and its left child is the root. RBTree_Node *root;
*/ /** This points to the min and max nodes of this RBT. */
RBTree_Node *first[2];
} RBTree_Control;
/* the RBTree_Control is actually part of the RBTree structure as an /**
* RBTree_Node. The mapping of fields from RBTree_Control to RBTree_Node are: * @brief RBTree initializer for an empty rbtree with designator @a name.
* permanent_null == parent */
* root == left
* first[0] == right
*/
typedef struct {
/** This points to a NULL. Useful for finding the root. */
RBTree_Node *permanent_null;
/** This points to the root node of the RBT. */
RBTree_Node *root;
/** This points to the min and max nodes of this RBT. */
RBTree_Node *first[2];
} RBTree_Control;
/**
* @brief RBTree initializer for an empty rbtree with designator @a name.
*/
#define RBTREE_INITIALIZER_EMPTY(name) \ #define RBTREE_INITIALIZER_EMPTY(name) \
{ \ { \
.permanent_null = NULL, \ .permanent_null = NULL, \
.root = NULL, \ .root = NULL, \
.first[0] = NULL, \ .first[0] = NULL, \
.first[1] = NULL, \ .first[1] = NULL, \
} }
/** /**
* @brief RBTree definition for an empty rbtree with designator @a name. * @brief RBTree definition for an empty rbtree with designator @a name.
*/ */
#define RBTREE_DEFINE_EMPTY(name) \ #define RBTREE_DEFINE_EMPTY(name) \
RBTree_Control name = RBTREE_INITIALIZER_EMPTY(name) RBTree_Control name = RBTREE_INITIALIZER_EMPTY(name)
/** /**
* @brief RBTree_Node initializer for an empty node with designator @a name. * @brief RBTree_Node initializer for an empty node with designator @a name.
*/ */
#define RBTREE_NODE_INITIALIZER_EMPTY(name) \ #define RBTREE_NODE_INITIALIZER_EMPTY(name) \
{ \ { \
.parent = NULL, \ .parent = NULL, \
.child[0] = NULL, \ .child[0] = NULL, \
.child[1] = NULL, \ .child[1] = NULL, \
.value = -1, \ .value = -1, \
RBT_RED \ RBT_RED \
} }
/** /**
* @brief RBTree definition for an empty rbtree with designator @a name. * @brief RBTree definition for an empty rbtree with designator @a name.
*/ */
#define RBTREE_NODE_DEFINE_EMPTY(name) \ #define RBTREE_NODE_DEFINE_EMPTY(name) \
RBTree_Node name = RBTREE_NODE_INITIALIZER_EMPTY(name) RBTree_Node name = RBTREE_NODE_INITIALIZER_EMPTY(name)
/**
* @brief Initialize a RBTree Header
*
* This routine initializes @a the_rbtree structure to manage the
* contiguous array of @a number_nodes nodes which starts at
* @a starting_address. Each node is of @a node_size bytes.
*/
void _RBTree_Initialize(
RBTree_Control *the_rbtree,
void *starting_address,
size_t number_nodes,
size_t node_size
);
/**
* @brief Obtain the min or max node of a rbtree
*
* This function removes the min or max node from @a the_rbtree and returns
* a pointer to that node. If @a the_rbtree is empty, then NULL is returned.
* @a dir specifies whether to return the min (0) or max (1).
*
* @return This method returns a pointer to a node. If a node was removed,
* then a pointer to that node is returned. If @a the_rbtree was
* empty, then NULL is returned.
*
* @note It disables interrupts to ensure the atomicity of the get operation.
*/
RBTree_Node *_RBTree_Get(
RBTree_Control *the_rbtree,
RBTree_Direction dir
);
/**
* @brief Check the min or max node on a rbtree
*
* This function returns a pointer to the min or max node of @a the_rbtree.
* If @a the_rbtree is empty, then NULL is returned. @a dir specifies
* whether to return the min (0) or max (1).
*
* @return This method returns a pointer to a node.
* If @a the_rbtree was empty, then NULL is returned.
*
* @note It disables interrupts to ensure the atomicity of the get operation.
*/
RBTree_Node *_RBTree_Peek(
RBTree_Control *the_rbtree,
RBTree_Direction dir
);
/**
* @brief Find the node with given value in the tree
*
* This function returns a pointer to the node with value equal to @a value
* if it exists in the Red-Black Tree @a the_rbtree, and NULL if not.
*/
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
unsigned int value
);
/**
* @brief Find the control structure of the tree containing the given node
*
* This function returns a pointer to the control structure of the tree
* containing @a the_node, if it exists, and NULL if not.
*/
RBTree_Control *_RBTree_Find_header(
RBTree_Node *the_node
);
/**
* @brief Insert a Node (unprotected)
*
* This routine inserts @a the_node on the Red-Black Tree @a the_rbtree.
*
* @retval 0 Successfully inserted.
* @retval -1 NULL @a the_node.
* @retval RBTree_Node* if one with equal value to @a the_node->value exists
* in @a the_rbtree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
/**
* @brief Insert a node on a rbtree
*
* This routine inserts @a the_node on the tree @a the_rbtree.
*
* @note It disables interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Insert(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
/**
* @brief Extract a Node (unprotected)
*
* This routine extracts (removes) @a the_node from @a the_rbtree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
/**
/** * @brief Delete a node from the rbtree
* @brief Initialize a RBTree Header *
* * This routine deletes @a the_node from @a the_rbtree.
* This routine initializes @a the_rbtree structure to manage the *
* contiguous array of @a number_nodes nodes which starts at * @note It disables interrupts to ensure the atomicity of the
* @a starting_address. Each node is of @a node_size bytes. * append operation.
*/ */
void _RBTree_Initialize( void _RBTree_Extract(
RBTree_Control *the_rbtree, RBTree_Control *the_rbtree,
void *starting_address, RBTree_Node *the_node
size_t number_nodes, );
size_t node_size
);
/**
* @brief Obtain the min or max node of a rbtree
*
* This function removes the min or max node from @a the_rbtree and returns
* a pointer to that node. If @a the_rbtree is empty, then NULL is returned.
* @a dir specifies whether to return the min (0) or max (1).
*
* @return This method returns a pointer to a node. If a node was removed,
* then a pointer to that node is returned. If @a the_rbtree was
* empty, then NULL is returned.
*
* @note It disables interrupts to ensure the atomicity of the get operation.
*/
RBTree_Node *_RBTree_Get(
RBTree_Control *the_rbtree,
RBTree_Direction dir
);
/**
* @brief Check the min or max node on a rbtree
*
* This function returns a pointer to the min or max node of @a the_rbtree.
* If @a the_rbtree is empty, then NULL is returned. @a dir specifies
* whether to return the min (0) or max (1).
*
* @return This method returns a pointer to a node.
* If @a the_rbtree was empty, then NULL is returned.
*
* @note It disables interrupts to ensure the atomicity of the get operation.
*/
RBTree_Node *_RBTree_Peek(
RBTree_Control *the_rbtree,
RBTree_Direction dir
);
/** @brief Find the node with given value in the tree
*
* This function returns a pointer to the node with value equal to @a value
* if it exists in the Red-Black Tree @a the_rbtree, and NULL if not.
*/
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
unsigned int value
);
/** @brief Find the control structure of the tree containing the given node
*
* This function returns a pointer to the control structure of the tree
* containing @a the_node, if it exists, and NULL if not.
*/
RBTree_Control *_RBTree_Find_header(
RBTree_Node *the_node
);
/** @brief Insert a Node (unprotected)
*
* This routine inserts @a the_node on the Red-Black Tree @a the_rbtree.
*
* @retval 0 Successfully inserted.
* @retval -1 NULL @a the_node.
* @retval RBTree_Node* if one with equal value to @a the_node->value exists
* in @a the_rbtree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
/**
* @brief Insert a node on a rbtree
*
* This routine inserts @a the_node on the tree @a the_rbtree.
*
* @note It disables interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Insert(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
/** @brief Extract a Node (unprotected)
*
* This routine extracts (removes) @a the_node from @a the_rbtree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
/**
* @brief Delete a node from the rbtree
*
* This routine deletes @a the_node from @a the_rbtree.
*
* @note It disables interrupts to ensure the atomicity of the
* append operation.
*/
void _RBTree_Extract(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
);
#ifndef __RTEMS_APPLICATION__ #ifndef __RTEMS_APPLICATION__
#include <rtems/score/rbtree.inl> #include <rtems/score/rbtree.inl>

View File

@@ -182,13 +182,15 @@ typedef enum {
*/ */
typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * ); typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * );
/** @brief Per Task Variable Manager Structure Forward Reference /**
* @brief Per Task Variable Manager Structure Forward Reference
* *
* Forward reference to the per task variable structure. * Forward reference to the per task variable structure.
*/ */
struct rtems_task_variable_tt; struct rtems_task_variable_tt;
/** @brief Per Task Variable Manager Structure /**
* @brief Per Task Variable Manager Structure
* *
* This is the internal structure used to manager per Task Variables. * This is the internal structure used to manager per Task Variables.
*/ */
@@ -270,7 +272,8 @@ typedef union {
const void *immutable_object; const void *immutable_object;
} Thread_Wait_information_Object_argument_type; } Thread_Wait_information_Object_argument_type;
/** @brief Thread Blocking Management Information /**
* @brief Thread Blocking Management Information
* *
* This contains the information required to manage a thread while it is * This contains the information required to manage a thread while it is
* blocked and to return information to it. * blocked and to return information to it.
@@ -788,39 +791,45 @@ void _Thread_blocking_operation_Cancel(
#if defined(RTEMS_SMP) #if defined(RTEMS_SMP)
/** @brief _Thread_Dispatch_initialization /**
* @brief _Thread_Dispatch_initialization
* *
* This routine initializes the thread dispatching subsystem. * This routine initializes the thread dispatching subsystem.
*/ */
void _Thread_Dispatch_initialization(void); void _Thread_Dispatch_initialization(void);
/** @brief _Thread_Dispatch_in_critical_section /**
* @brief _Thread_Dispatch_in_critical_section
* *
* This routine returns true if thread dispatch indicates * This routine returns true if thread dispatch indicates
* that we are in a critical section. * that we are in a critical section.
*/ */
bool _Thread_Dispatch_in_critical_section(void); bool _Thread_Dispatch_in_critical_section(void);
/** @brief _Thread_Dispatch_get_disable_level /**
* @brief _Thread_Dispatch_get_disable_level
* *
* This routine returns value of the the thread dispatch level. * This routine returns value of the the thread dispatch level.
*/ */
uint32_t _Thread_Dispatch_get_disable_level(void); uint32_t _Thread_Dispatch_get_disable_level(void);
/** @brief _Thread_Dispatch_set_disable_level /**
* @brief _Thread_Dispatch_set_disable_level
* *
* This routine sets thread dispatch level to the * This routine sets thread dispatch level to the
* value passed in. * value passed in.
*/ */
uint32_t _Thread_Dispatch_set_disable_level(uint32_t value); uint32_t _Thread_Dispatch_set_disable_level(uint32_t value);
/** @brief _Thread_Dispatch_increment_disable_level /**
* @brief _Thread_Dispatch_increment_disable_level
* *
* This rountine increments the thread dispatch level * This rountine increments the thread dispatch level
*/ */
uint32_t _Thread_Dispatch_increment_disable_level(void); uint32_t _Thread_Dispatch_increment_disable_level(void);
/** @brief _Thread_Dispatch_decrement_disable_level /**
* @brief _Thread_Dispatch_decrement_disable_level
* *
* This routine decrements the thread dispatch level. * This routine decrements the thread dispatch level.
*/ */

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2006. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -33,7 +33,8 @@
extern "C" { extern "C" {
#endif #endif
/** @brief _Thread_MP_Handler_initialization /**
* @brief _Thread_MP_Handler_initialization
* *
* This routine initializes the multiprocessing portion of the Thread Handler. * This routine initializes the multiprocessing portion of the Thread Handler.
*/ */
@@ -41,7 +42,8 @@ void _Thread_MP_Handler_initialization (
uint32_t maximum_proxies uint32_t maximum_proxies
); );
/** @brief _Thread_MP_Allocate_proxy /**
* @brief _Thread_MP_Allocate_proxy
* *
* This allocates a proxy control block from * This allocates a proxy control block from
* the inactive chain of free proxy control blocks. * the inactive chain of free proxy control blocks.
@@ -53,7 +55,8 @@ Thread_Control *_Thread_MP_Allocate_proxy (
States_Control the_state States_Control the_state
); );
/** @brief _Thread_MP_Find_proxy /**
* @brief _Thread_MP_Find_proxy
* *
* This function removes the proxy control block for the specified * This function removes the proxy control block for the specified
* id from the active chain of proxy control blocks. * id from the active chain of proxy control blocks.
@@ -62,13 +65,15 @@ Thread_Control *_Thread_MP_Find_proxy (
Objects_Id the_id Objects_Id the_id
); );
/** @brief Active Proxy Set /**
* @brief Active Proxy Set
* *
* The following chain is used to manage the active set proxies. * The following chain is used to manage the active set proxies.
*/ */
SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies; SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies;
/** @brief Inactive Proxy Set /**
* @brief Inactive Proxy Set
* *
* The following chain is used to manage the inactive set of proxies. * The following chain is used to manage the inactive set of proxies.
*/ */

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -60,7 +60,8 @@ typedef void ( *Thread_queue_Timeout_callout )(
void * void *
); );
/** @brief Thread queue Dequeue /**
* @brief Thread queue Dequeue
* *
* This function returns a pointer to a thread waiting on * This function returns a pointer to a thread waiting on
* the_thread_queue. The selection of this thread is based on * the_thread_queue. The selection of this thread is based on
@@ -71,7 +72,8 @@ Thread_Control *_Thread_queue_Dequeue(
Thread_queue_Control *the_thread_queue Thread_queue_Control *the_thread_queue
); );
/** @brief Thread queue Enqueue Wrapper /**
* @brief Thread queue Enqueue Wrapper
* *
* This routine enqueues the currently executing thread on * This routine enqueues the currently executing thread on
* the_thread_queue with an optional timeout. * the_thread_queue with an optional timeout.
@@ -83,7 +85,8 @@ Thread_Control *_Thread_queue_Dequeue(
_Thread_queue_Timeout ) _Thread_queue_Timeout )
/** @brief Thread queue Enqueue /**
* @brief Thread queue Enqueue
* *
* This routine enqueues the currently executing thread on * This routine enqueues the currently executing thread on
* the_thread_queue with an optional timeout. * the_thread_queue with an optional timeout.
@@ -108,7 +111,8 @@ void _Thread_queue_Requeue(
Thread_Control *the_thread Thread_Control *the_thread
); );
/** @brief Thread queue Extract /**
* @brief Thread queue Extract
* *
* This routine removes the_thread from the_thread_queue * This routine removes the_thread from the_thread_queue
* and cancels any timeouts associated with this blocking. * and cancels any timeouts associated with this blocking.
@@ -118,7 +122,8 @@ void _Thread_queue_Extract(
Thread_Control *the_thread Thread_Control *the_thread
); );
/** @brief Thread queue Extract with proxy /**
* @brief Thread queue Extract with proxy
* *
* This routine extracts the_thread from the_thread_queue * This routine extracts the_thread from the_thread_queue
* and ensures that if there is a proxy for this task on * and ensures that if there is a proxy for this task on
@@ -128,7 +133,8 @@ bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread Thread_Control *the_thread
); );
/** @brief Thread queue First /**
* @brief Thread queue First
* *
* This function returns a pointer to the "first" thread * This function returns a pointer to the "first" thread
* on the_thread_queue. The "first" thread is selected * on the_thread_queue. The "first" thread is selected
@@ -138,7 +144,8 @@ Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue Thread_queue_Control *the_thread_queue
); );
/** @brief Thread queue Flush /**
* @brief Thread queue Flush
* *
* This routine unblocks all threads blocked on the_thread_queue * This routine unblocks all threads blocked on the_thread_queue
* and cancels any associated timeouts. * and cancels any associated timeouts.
@@ -149,7 +156,8 @@ void _Thread_queue_Flush(
uint32_t status uint32_t status
); );
/** @brief Thread queue Initialize /**
* @brief Thread queue Initialize
* *
* This routine initializes the_thread_queue based on the * This routine initializes the_thread_queue based on the
* discipline indicated in attribute_set. The state set on * discipline indicated in attribute_set. The state set on
@@ -162,7 +170,8 @@ void _Thread_queue_Initialize(
uint32_t timeout_status uint32_t timeout_status
); );
/** @brief Thread queue Dequeue priority /**
* @brief Thread queue Dequeue priority
* *
* This function returns a pointer to the highest priority * This function returns a pointer to the highest priority
* thread waiting on the_thread_queue. If no threads are waiting * thread waiting on the_thread_queue. If no threads are waiting
@@ -172,7 +181,8 @@ Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue Thread_queue_Control *the_thread_queue
); );
/** @brief Thread queue Enqueue priority /**
* @brief Thread queue Enqueue priority
* *
* This routine enqueues the currently executing thread on * This routine enqueues the currently executing thread on
* the_thread_queue with an optional timeout using the * the_thread_queue with an optional timeout using the
@@ -184,7 +194,8 @@ Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
ISR_Level *level_p ISR_Level *level_p
); );
/** @brief Thread queue Extract priority Helper /**
* @brief Thread queue Extract priority Helper
* *
* This routine removes the_thread from the_thread_queue * This routine removes the_thread from the_thread_queue
* and cancels any timeouts associated with this blocking. * and cancels any timeouts associated with this blocking.
@@ -205,7 +216,8 @@ void _Thread_queue_Extract_priority_helper(
_Thread_queue_Extract_priority_helper( _the_thread_queue, _the_thread, false ) _Thread_queue_Extract_priority_helper( _the_thread_queue, _the_thread, false )
/** @brief Thread queue First priority /**
* @brief Thread queue First priority
* *
* This function returns a pointer to the "first" thread * This function returns a pointer to the "first" thread
* on the_thread_queue. The "first" thread is the highest * on the_thread_queue. The "first" thread is the highest
@@ -215,7 +227,8 @@ Thread_Control *_Thread_queue_First_priority(
Thread_queue_Control *the_thread_queue Thread_queue_Control *the_thread_queue
); );
/** @brief Thread queue Dequeue FIFO /**
* @brief Thread queue Dequeue FIFO
* *
* This function returns a pointer to the thread which has * This function returns a pointer to the thread which has
* been waiting the longest on the_thread_queue. If no * been waiting the longest on the_thread_queue. If no
@@ -225,7 +238,8 @@ Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue Thread_queue_Control *the_thread_queue
); );
/** @brief Thread queue Enqueue FIFO /**
* @brief Thread queue Enqueue FIFO
* *
* This routine enqueues the currently executing thread on * This routine enqueues the currently executing thread on
* the_thread_queue with an optional timeout using the * the_thread_queue with an optional timeout using the
@@ -237,7 +251,8 @@ Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
ISR_Level *level_p ISR_Level *level_p
); );
/** @brief Thread queue Extract FIFO /**
* @brief Thread queue Extract FIFO
* *
* This routine removes the_thread from the_thread_queue * This routine removes the_thread from the_thread_queue
* and cancels any timeouts associated with this blocking. * and cancels any timeouts associated with this blocking.
@@ -247,7 +262,8 @@ void _Thread_queue_Extract_fifo(
Thread_Control *the_thread Thread_Control *the_thread
); );
/** @brief Thread queue First FIFO /**
* @brief Thread queue First FIFO
* *
* This function returns a pointer to the "first" thread * This function returns a pointer to the "first" thread
* on the_thread_queue. The first thread is the thread * on the_thread_queue. The first thread is the thread
@@ -257,7 +273,8 @@ Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue Thread_queue_Control *the_thread_queue
); );
/** @brief Thread queue timeout /**
* @brief Thread queue timeout
* *
* This routine is invoked when a task's request has not * This routine is invoked when a task's request has not
* been satisfied after the timeout interval specified to * been satisfied after the timeout interval specified to

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -34,7 +34,8 @@
extern "C" { extern "C" {
#endif #endif
/** @brief Set Timespec to Seconds Nanosecond /**
* @brief Set Timespec to Seconds Nanosecond
* *
* This method sets the timespec to the specified seconds and nanoseconds * This method sets the timespec to the specified seconds and nanoseconds
* value. * value.
@@ -49,7 +50,8 @@ extern "C" {
(_time)->tv_nsec = (_nanoseconds); \ (_time)->tv_nsec = (_nanoseconds); \
} while (0) } while (0)
/** @brief Zero Timespec /**
* @brief Zero Timespec
* *
* This method sets the timespec to zero. * This method sets the timespec to zero.
* value. * value.
@@ -62,7 +64,8 @@ extern "C" {
(_time)->tv_nsec = 0; \ (_time)->tv_nsec = 0; \
} while (0) } while (0)
/** @brief Get Seconds Portion of Timespec /**
* @brief Get Seconds Portion of Timespec
* *
* This method returns the seconds portion of the specified timespec * This method returns the seconds portion of the specified timespec
* *
@@ -73,7 +76,8 @@ extern "C" {
#define _Timespec_Get_seconds( _time ) \ #define _Timespec_Get_seconds( _time ) \
((_time)->tv_sec) ((_time)->tv_sec)
/** @brief Get Nanoseconds Portion of Timespec /**
* @brief Get Nanoseconds Portion of Timespec
* *
* This method returns the nanoseconds portion of the specified timespec * This method returns the nanoseconds portion of the specified timespec
* *
@@ -84,7 +88,8 @@ extern "C" {
#define _Timespec_Get_nanoseconds( _time ) \ #define _Timespec_Get_nanoseconds( _time ) \
((_time)->tv_nsec) ((_time)->tv_nsec)
/** @brief Is Timespec Valid /**
* @brief Is Timespec Valid
* *
* This method determines the validity of a timespec. * This method determines the validity of a timespec.
* *
@@ -97,7 +102,8 @@ bool _Timespec_Is_valid(
const struct timespec *time const struct timespec *time
); );
/** @brief Timespec Less Than Operator /**
* @brief Timespec Less Than Operator
* *
* This method is the less than operator for timespecs. * This method is the less than operator for timespecs.
* *
@@ -112,7 +118,8 @@ bool _Timespec_Less_than(
const struct timespec *rhs const struct timespec *rhs
); );
/** @brief Timespec Greater Than Operator /**
* @brief Timespec Greater Than Operator
* *
* This method is the greater than operator for timespecs. * This method is the greater than operator for timespecs.
* *
@@ -127,7 +134,8 @@ bool _Timespec_Greater_than(
const struct timespec *rhs const struct timespec *rhs
); );
/** @brief Timespec equal to Operator /**
* @brief Timespec equal to Operator
* *
* This method is the is equal to than operator for timespecs. * This method is the is equal to than operator for timespecs.
* *
@@ -142,7 +150,8 @@ bool _Timespec_Greater_than(
((lhs)->tv_nsec == (rhs)->tv_nsec) \ ((lhs)->tv_nsec == (rhs)->tv_nsec) \
) )
/** @brief Add to a Timespec /**
* @brief Add to a Timespec
* *
* This routine adds two timespecs. The second argument is added * This routine adds two timespecs. The second argument is added
* to the first. * to the first.
@@ -157,7 +166,8 @@ uint32_t _Timespec_Add_to(
const struct timespec *add const struct timespec *add
); );
/** @brief Convert Timespec to Number of Ticks /**
* @brief Convert Timespec to Number of Ticks
* *
* This routine convert the @a time timespec to the corresponding number * This routine convert the @a time timespec to the corresponding number
* of clock ticks. * of clock ticks.
@@ -170,7 +180,8 @@ uint32_t _Timespec_To_ticks(
const struct timespec *time const struct timespec *time
); );
/** @brief Convert Ticks to Timespec /**
* @brief Convert Ticks to Timespec
* *
* This routine converts the @a ticks value to the corresponding * This routine converts the @a ticks value to the corresponding
* timespec format @a time. * timespec format @a time.
@@ -183,7 +194,8 @@ void _Timespec_From_ticks(
struct timespec *time struct timespec *time
); );
/** @brief Subtract Two Timespec /**
* @brief Subtract Two Timespec
* *
* This routine subtracts two timespecs. @a result is set to * This routine subtracts two timespecs. @a result is set to
* @a end - @a start. * @a end - @a start.
@@ -200,7 +212,8 @@ void _Timespec_Subtract(
struct timespec *result struct timespec *result
); );
/** @brief Divide Timespec By Integer /**
* @brief Divide Timespec By Integer
* *
* This routine divides a timespec by an integer value. The expected * This routine divides a timespec by an integer value. The expected
* use is to assist in benchmark calculations where you typically * use is to assist in benchmark calculations where you typically
@@ -218,7 +231,8 @@ void _Timespec_Divide_by_integer(
struct timespec *result struct timespec *result
); );
/** @brief Divide Timespec /**
* @brief Divide Timespec
* *
* This routine divides a timespec by another timespec. The * This routine divides a timespec by another timespec. The
* intended use is for calculating percentages to three decimal points. * intended use is for calculating percentages to three decimal points.

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -130,7 +130,8 @@ extern "C" {
typedef Timestamp64_Control Timestamp_Control; typedef Timestamp64_Control Timestamp_Control;
#endif #endif
/** @brief Set Timestamp to Seconds Nanosecond /**
* @brief Set Timestamp to Seconds Nanosecond
* *
* This method sets the timestamp to the specified seconds and nanoseconds * This method sets the timestamp to the specified seconds and nanoseconds
* value. * value.
@@ -147,7 +148,8 @@ extern "C" {
_Timestamp64_Set( _time, _seconds, _nanoseconds ) _Timestamp64_Set( _time, _seconds, _nanoseconds )
#endif #endif
/** @brief Zero Timestamp /**
* @brief Zero Timestamp
* *
* This method sets the timestamp to zero. * This method sets the timestamp to zero.
* value. * value.
@@ -162,7 +164,8 @@ extern "C" {
_Timestamp64_Set_to_zero( _time ) _Timestamp64_Set_to_zero( _time )
#endif #endif
/** @brief Is Timestamp Valid /**
* @brief Is Timestamp Valid
* *
* This method determines the validity of a timestamp. * This method determines the validity of a timestamp.
* *
@@ -179,7 +182,8 @@ extern "C" {
_Timestamp64_Is_valid( _time ) _Timestamp64_Is_valid( _time )
#endif #endif
/** @brief Timestamp Less Than Operator /**
* @brief Timestamp Less Than Operator
* *
* This method is the less than operator for timestamps. * This method is the less than operator for timestamps.
* *
@@ -197,7 +201,8 @@ extern "C" {
_Timestamp64_Less_than( _lhs, _rhs ) _Timestamp64_Less_than( _lhs, _rhs )
#endif #endif
/** @brief Timestamp Greater Than Operator /**
* @brief Timestamp Greater Than Operator
* *
* This method is the greater than operator for timestamps. * This method is the greater than operator for timestamps.
* *
@@ -215,7 +220,8 @@ extern "C" {
_Timestamp64_Greater_than( _lhs, _rhs ) _Timestamp64_Greater_than( _lhs, _rhs )
#endif #endif
/** @brief Timestamp equal to Operator /**
* @brief Timestamp equal to Operator
* *
* This method is the is equal to than operator for timestamps. * This method is the is equal to than operator for timestamps.
* *
@@ -233,7 +239,8 @@ extern "C" {
_Timestamp64_Equal_to( _lhs, _rhs ) _Timestamp64_Equal_to( _lhs, _rhs )
#endif #endif
/** @brief Add to a Timestamp /**
* @brief Add to a Timestamp
* *
* This routine adds two timestamps. The second argument is added * This routine adds two timestamps. The second argument is added
* to the first. * to the first.
@@ -251,7 +258,8 @@ extern "C" {
_Timestamp64_Add_to( _time, _add ) _Timestamp64_Add_to( _time, _add )
#endif #endif
/** @brief Add to a Timestamp (At Clock Tick) /**
* @brief Add to a Timestamp (At Clock Tick)
* *
* This routine adds two timestamps. The second argument is added * This routine adds two timestamps. The second argument is added
* to the first. * to the first.
@@ -275,7 +283,8 @@ extern "C" {
_Timestamp64_Add_to_at_tick( _time, _add ) _Timestamp64_Add_to_at_tick( _time, _add )
#endif #endif
/** @brief Convert Timestamp to Number of Ticks /**
* @brief Convert Timestamp to Number of Ticks
* *
* This routine convert the @a time timestamp to the corresponding number * This routine convert the @a time timestamp to the corresponding number
* of clock ticks. * of clock ticks.
@@ -292,7 +301,8 @@ extern "C" {
_Timestamp64_To_ticks( _time ) _Timestamp64_To_ticks( _time )
#endif #endif
/** @brief Convert Ticks to Timestamp /**
* @brief Convert Ticks to Timestamp
* *
* This routine converts the @a _ticks value to the corresponding * This routine converts the @a _ticks value to the corresponding
* timestamp format @a _time. * timestamp format @a _time.
@@ -308,7 +318,8 @@ extern "C" {
_Timestamp64_From_ticks( _ticks, _time ) _Timestamp64_From_ticks( _ticks, _time )
#endif #endif
/** @brief Subtract Two Timestamp /**
* @brief Subtract Two Timestamp
* *
* This routine subtracts two timestamps. @a result is set to * This routine subtracts two timestamps. @a result is set to
* @a end - @a start. * @a end - @a start.
@@ -328,7 +339,8 @@ extern "C" {
_Timestamp64_Subtract( _start, _end, _result ) _Timestamp64_Subtract( _start, _end, _result )
#endif #endif
/** @brief Divide Timestamp By Integer /**
* @brief Divide Timestamp By Integer
* *
* This routine divides a timestamp by an integer value. The expected * This routine divides a timestamp by an integer value. The expected
* use is to assist in benchmark calculations where you typically * use is to assist in benchmark calculations where you typically
@@ -348,7 +360,8 @@ extern "C" {
_Timestamp64_Divide_by_integer( _time, _iterations, _result ) _Timestamp64_Divide_by_integer( _time, _iterations, _result )
#endif #endif
/** @brief Divide Timestamp /**
* @brief Divide Timestamp
* *
* This routine divides a timestamp by another timestamp. The * This routine divides a timestamp by another timestamp. The
* intended use is for calculating percentages to three decimal points. * intended use is for calculating percentages to three decimal points.
@@ -368,7 +381,8 @@ extern "C" {
_Timestamp64_Divide( _lhs, _rhs, _ival_percentage, _fval_percentage ) _Timestamp64_Divide( _lhs, _rhs, _ival_percentage, _fval_percentage )
#endif #endif
/** @brief Get Seconds Portion of Timestamp /**
* @brief Get Seconds Portion of Timestamp
* *
* This method returns the seconds portion of the specified timestamp * This method returns the seconds portion of the specified timestamp
* *
@@ -384,7 +398,8 @@ extern "C" {
_Timestamp64_Get_seconds( _time ) _Timestamp64_Get_seconds( _time )
#endif #endif
/** @brief Get Nanoseconds Portion of Timestamp /**
* @brief Get Nanoseconds Portion of Timestamp
* *
* This method returns the nanoseconds portion of the specified timestamp * This method returns the nanoseconds portion of the specified timestamp
* *
@@ -400,7 +415,8 @@ extern "C" {
_Timestamp64_Get_nanoseconds( _time ) _Timestamp64_Get_nanoseconds( _time )
#endif #endif
/** @brief Convert Timestamp to struct timespec /**
* @brief Convert Timestamp to struct timespec
* *
* This method returns the seconds portion of the specified timestamp * This method returns the seconds portion of the specified timestamp
* *

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -51,7 +51,8 @@ extern "C" {
*/ */
typedef int64_t Timestamp64_Control; typedef int64_t Timestamp64_Control;
/** @brief Set Timestamp to Seconds Nanosecond /**
* @brief Set Timestamp to Seconds Nanosecond
* *
* This method sets the timestamp to the specified seconds and nanoseconds * This method sets the timestamp to the specified seconds and nanoseconds
* value. * value.
@@ -74,7 +75,8 @@ typedef int64_t Timestamp64_Control;
); );
#endif #endif
/** @brief Zero Timestamp /**
* @brief Zero Timestamp
* *
* This method sets the timestamp to zero. * This method sets the timestamp to zero.
* value. * value.
@@ -90,7 +92,8 @@ typedef int64_t Timestamp64_Control;
); );
#endif #endif
/** @brief Is Timestamp Valid /**
* @brief Is Timestamp Valid
* *
* This method determines the validity of a timestamp. * This method determines the validity of a timestamp.
* *
@@ -102,7 +105,8 @@ typedef int64_t Timestamp64_Control;
#define _Timestamp64_Is_valid( _time ) \ #define _Timestamp64_Is_valid( _time ) \
(1) (1)
/** @brief Timestamp Less Than Operator /**
* @brief Timestamp Less Than Operator
* *
* This method is the less than operator for timestamps. * This method is the less than operator for timestamps.
* *
@@ -122,7 +126,8 @@ typedef int64_t Timestamp64_Control;
); );
#endif #endif
/** @brief Timestamp Greater Than Operator /**
* @brief Timestamp Greater Than Operator
* *
* This method is the greater than operator for timestamps. * This method is the greater than operator for timestamps.
* *
@@ -142,7 +147,8 @@ typedef int64_t Timestamp64_Control;
); );
#endif #endif
/** @brief Timestamp equal to Operator /**
* @brief Timestamp equal to Operator
* *
* This method is the is equal to than operator for timestamps. * This method is the is equal to than operator for timestamps.
* *
@@ -162,7 +168,8 @@ typedef int64_t Timestamp64_Control;
); );
#endif #endif
/** @brief Add to a Timestamp /**
* @brief Add to a Timestamp
* *
* This routine adds two timestamps. The second argument is added * This routine adds two timestamps. The second argument is added
* to the first. * to the first.
@@ -182,7 +189,8 @@ typedef int64_t Timestamp64_Control;
); );
#endif #endif
/** @brief Add to a Timestamp (At Clock Tick) /**
* @brief Add to a Timestamp (At Clock Tick)
* *
* This routine adds two timestamps. The second argument is added * This routine adds two timestamps. The second argument is added
* to the first. * to the first.
@@ -211,7 +219,8 @@ static inline uint32_t _Timestamp64_Add_to_at_tick(
return 0; return 0;
} }
/** @brief Convert Timestamp to Number of Ticks /**
* @brief Convert Timestamp to Number of Ticks
* *
* This routine convert the @a time timestamp to the corresponding number * This routine convert the @a time timestamp to the corresponding number
* of clock ticks. * of clock ticks.
@@ -224,7 +233,8 @@ uint32_t _Timestamp64_To_ticks(
const Timestamp64_Control *_time const Timestamp64_Control *_time
); );
/** @brief Convert Ticks to Timestamp /**
* @brief Convert Ticks to Timestamp
* *
* This routine converts the @a _ticks value to the corresponding * This routine converts the @a _ticks value to the corresponding
* timestamp format @a _time. * timestamp format @a _time.
@@ -237,7 +247,8 @@ void _Timestamp64_From_ticks(
Timestamp64_Control *_time Timestamp64_Control *_time
); );
/** @brief Subtract Two Timestamp /**
* @brief Subtract Two Timestamp
* *
* This routine subtracts two timestamps. @a result is set to * This routine subtracts two timestamps. @a result is set to
* @a end - @a start. * @a end - @a start.
@@ -262,7 +273,8 @@ void _Timestamp64_From_ticks(
); );
#endif #endif
/** @brief Divide Timestamp By Integer /**
* @brief Divide Timestamp By Integer
* *
* This routine divides a timestamp by an integer value. The expected * This routine divides a timestamp by an integer value. The expected
* use is to assist in benchmark calculations where you typically * use is to assist in benchmark calculations where you typically
@@ -287,7 +299,8 @@ void _Timestamp64_From_ticks(
); );
#endif #endif
/** @brief Divide Timestamp /**
* @brief Divide Timestamp
* *
* This routine divides a timestamp by another timestamp. The * This routine divides a timestamp by another timestamp. The
* intended use is for calculating percentages to three decimal points. * intended use is for calculating percentages to three decimal points.
@@ -306,7 +319,8 @@ void _Timestamp64_Divide(
uint32_t *_fval_percentage uint32_t *_fval_percentage
); );
/** @brief Get Seconds Portion of Timestamp /**
* @brief Get Seconds Portion of Timestamp
* *
* This method returns the seconds portion of the specified timestamp * This method returns the seconds portion of the specified timestamp
* *
@@ -323,7 +337,8 @@ void _Timestamp64_Divide(
); );
#endif #endif
/** @brief Get Nanoseconds Portion of Timestamp /**
* @brief Get Nanoseconds Portion of Timestamp
* *
* This method returns the nanoseconds portion of the specified timestamp * This method returns the nanoseconds portion of the specified timestamp
* *
@@ -340,7 +355,8 @@ void _Timestamp64_Divide(
); );
#endif #endif
/** @brief Convert Timestamp to struct timespec /**
* @brief Convert Timestamp to struct timespec
* *
* This method returns the seconds portion of the specified timestamp * This method returns the seconds portion of the specified timestamp
* *

View File

@@ -6,7 +6,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -102,7 +102,8 @@ extern "C" {
(((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
(4 * TOD_SECONDS_PER_DAY)) (4 * TOD_SECONDS_PER_DAY))
/** @brief RTEMS Epoch Year /**
* @brief RTEMS Epoch Year
* *
* The following constant define the earliest year to which an * The following constant define the earliest year to which an
* time of day can be initialized. This is considered the * time of day can be initialized. This is considered the
@@ -117,37 +118,46 @@ extern "C" {
*/ */
/**@{*/ /**@{*/
/** @brief Is the Time Of Day Set /**
* @brief Is the Time Of Day Set
* *
* This is true if the application has set the current * This is true if the application has set the current
* time of day, and false otherwise. * time of day, and false otherwise.
*/ */
SCORE_EXTERN bool _TOD_Is_set; SCORE_EXTERN bool _TOD_Is_set;
/** @brief Current Time of Day (Timespec) /**
* @brief Current Time of Day (Timespec)
*
* The following contains the current time of day. * The following contains the current time of day.
*/ */
SCORE_EXTERN Timestamp_Control _TOD_Now; SCORE_EXTERN Timestamp_Control _TOD_Now;
/** @brief Current Time of Day (Timespec) /**
* @brief Current Time of Day (Timespec)
*
* The following contains the running uptime. * The following contains the running uptime.
*/ */
SCORE_EXTERN Timestamp_Control _TOD_Uptime; SCORE_EXTERN Timestamp_Control _TOD_Uptime;
/** @brief Seconds Since RTEMS Epoch /**
* @brief Seconds Since RTEMS Epoch
*
* The following contains the number of seconds from 00:00:00 * The following contains the number of seconds from 00:00:00
* January 1, TOD_BASE_YEAR until the current time of day. * January 1, TOD_BASE_YEAR until the current time of day.
*/ */
#define _TOD_Seconds_since_epoch() \ #define _TOD_Seconds_since_epoch() \
_Timestamp_Get_seconds(&_TOD_Now) _Timestamp_Get_seconds(&_TOD_Now)
/** @brief _TOD_Handler_initialization /**
* @brief _TOD_Handler_initialization
* *
* This routine performs the initialization necessary for this handler. * This routine performs the initialization necessary for this handler.
*/ */
void _TOD_Handler_initialization(void); void _TOD_Handler_initialization(void);
/** @brief _TOD_Set /**
* @brief _TOD_Set
* *
* This routine sets the current time of day to @a time and * This routine sets the current time of day to @a time and
* the equivalent SECONDS_SINCE_EPOCH. * the equivalent SECONDS_SINCE_EPOCH.
@@ -156,7 +166,8 @@ void _TOD_Set(
const struct timespec *time const struct timespec *time
); );
/** @brief _TOD_Get /**
* @brief _TOD_Get
* *
* This routine returns the current time of day with potential accuracy * This routine returns the current time of day with potential accuracy
* to the nanosecond. * to the nanosecond.
@@ -167,7 +178,8 @@ void _TOD_Get(
struct timespec *time struct timespec *time
); );
/** @brief _TOD_Get_uptime /**
* @brief _TOD_Get_uptime
* *
* This routine returns the system uptime with potential accuracy * This routine returns the system uptime with potential accuracy
* to the nanosecond. * to the nanosecond.
@@ -178,7 +190,8 @@ void _TOD_Get_uptime(
Timestamp_Control *time Timestamp_Control *time
); );
/** @brief _TOD_Get_uptime_as_timespec /**
* @brief _TOD_Get_uptime_as_timespec
* *
* This routine returns the system uptime with potential accuracy * This routine returns the system uptime with potential accuracy
* to the nanosecond. * to the nanosecond.
@@ -195,7 +208,8 @@ void _TOD_Get_uptime_as_timespec(
*/ */
void _TOD_Tickle_ticks( void ); void _TOD_Tickle_ticks( void );
/** @brief TOD_MILLISECONDS_TO_MICROSECONDS /**
* @brief TOD_MILLISECONDS_TO_MICROSECONDS
* *
* This routine converts an interval expressed in milliseconds to microseconds. * This routine converts an interval expressed in milliseconds to microseconds.
* *
@@ -203,7 +217,8 @@ void _TOD_Tickle_ticks( void );
*/ */
#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((uint32_t)(_ms) * 1000L) #define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((uint32_t)(_ms) * 1000L)
/** @brief TOD_MICROSECONDS_TO_TICKS /**
* @brief TOD_MICROSECONDS_TO_TICKS
* *
* This routine converts an interval expressed in microseconds to ticks. * This routine converts an interval expressed in microseconds to ticks.
* *
@@ -213,7 +228,8 @@ uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds uint32_t microseconds
); );
/** @brief TOD_MILLISECONDS_TO_TICKS /**
* @brief TOD_MILLISECONDS_TO_TICKS
* *
* This routine converts an interval expressed in milliseconds to ticks. * This routine converts an interval expressed in milliseconds to ticks.
* *
@@ -223,7 +239,8 @@ uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds uint32_t milliseconds
); );
/** @brief How many ticks in a second? /**
* @brief How many ticks in a second?
* *
* This method returns the number of ticks in a second. * This method returns the number of ticks in a second.
* *
@@ -232,7 +249,8 @@ uint32_t TOD_MILLISECONDS_TO_TICKS(
*/ */
uint32_t TOD_TICKS_PER_SECOND_method(void); uint32_t TOD_TICKS_PER_SECOND_method(void);
/** @brief Method to return number of ticks in a second /**
* @brief Method to return number of ticks in a second
* *
* This method exists to hide the fact that TOD_TICKS_PER_SECOND can not * This method exists to hide the fact that TOD_TICKS_PER_SECOND can not
* be implemented as a macro in a .h file due to visibility issues. * be implemented as a macro in a .h file due to visibility issues.

View File

@@ -7,7 +7,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2007. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -37,33 +37,38 @@
extern "C" { extern "C" {
#endif #endif
/** @brief Maximum Interval Length /**
* @brief Maximum Interval Length
* *
* The following type defines the control block used to manage * The following type defines the control block used to manage
* intervals. * intervals.
*/ */
#define WATCHDOG_MAXIMUM_INTERVAL ((Watchdog_Interval) 0xffffffff) #define WATCHDOG_MAXIMUM_INTERVAL ((Watchdog_Interval) 0xffffffff)
/** @brief Watchdog Interval Type /**
* @brief Watchdog Interval Type
* *
* This type is used to specify the length of intervals. * This type is used to specify the length of intervals.
*/ */
typedef uint32_t Watchdog_Interval; typedef uint32_t Watchdog_Interval;
/** @brief Watchdog Nanoseconds Since Last Tick Extension /**
* @brief Watchdog Nanoseconds Since Last Tick Extension
* *
* This type defines a pointer to the BSP plugin to obtain the number * This type defines a pointer to the BSP plugin to obtain the number
* of nanoseconds since the last clock tick. * of nanoseconds since the last clock tick.
*/ */
typedef uint32_t (*Watchdog_Nanoseconds_since_last_tick_routine)(void); typedef uint32_t (*Watchdog_Nanoseconds_since_last_tick_routine)(void);
/** @brief Watchdog Service Routine Return Type /**
* @brief Watchdog Service Routine Return Type
* *
* This type defines the return type from a Watchdog Service Routine. * This type defines the return type from a Watchdog Service Routine.
*/ */
typedef void Watchdog_Service_routine; typedef void Watchdog_Service_routine;
/** @brief Watchdog Service Routine Pointer Type /**
* @brief Watchdog Service Routine Pointer Type
* *
* This type define a pointer to a watchdog service routine. * This type define a pointer to a watchdog service routine.
*/ */
@@ -72,14 +77,16 @@ typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )(
void * void *
); );
/** @brief No timeout constant /**
* @brief No timeout constant
* *
* This is the constant for indefinite wait. It is actually an * This is the constant for indefinite wait. It is actually an
* illegal interval. * illegal interval.
*/ */
#define WATCHDOG_NO_TIMEOUT 0 #define WATCHDOG_NO_TIMEOUT 0
/** @brief Watchdog States Type /**
* @brief Watchdog States Type
* *
* This enumerated type is the set of the states in which a * This enumerated type is the set of the states in which a
* watchdog timer may be at any given time. * watchdog timer may be at any given time.
@@ -100,7 +107,8 @@ typedef enum {
WATCHDOG_REMOVE_IT WATCHDOG_REMOVE_IT
} Watchdog_States; } Watchdog_States;
/** @brief Watchdog Adjustment Directions Type /**
* @brief Watchdog Adjustment Directions Type
* *
* The following enumerated type details the manner in which * The following enumerated type details the manner in which
* a watchdog chain may be adjusted by the @ref _Watchdog_Adjust * a watchdog chain may be adjusted by the @ref _Watchdog_Adjust
@@ -114,7 +122,8 @@ typedef enum {
WATCHDOG_BACKWARD WATCHDOG_BACKWARD
} Watchdog_Adjust_directions; } Watchdog_Adjust_directions;
/** @brief Watchdog Control Structure /**
* @brief Watchdog Control Structure
* *
* The following record defines the control block used * The following record defines the control block used
* to manage each watchdog timer. * to manage each watchdog timer.
@@ -144,28 +153,32 @@ typedef struct {
void *user_data; void *user_data;
} Watchdog_Control; } Watchdog_Control;
/** @brief Watchdog Synchronization Level /**
* @brief Watchdog Synchronization Level
* *
* This used for synchronization purposes * This used for synchronization purposes
* during an insert on a watchdog delta chain. * during an insert on a watchdog delta chain.
*/ */
SCORE_EXTERN volatile uint32_t _Watchdog_Sync_level; SCORE_EXTERN volatile uint32_t _Watchdog_Sync_level;
/** @brief Watchdog Synchronization Count /**
* @brief Watchdog Synchronization Count
* *
* This used for synchronization purposes * This used for synchronization purposes
* during an insert on a watchdog delta chain. * during an insert on a watchdog delta chain.
*/ */
SCORE_EXTERN volatile uint32_t _Watchdog_Sync_count; SCORE_EXTERN volatile uint32_t _Watchdog_Sync_count;
/** @brief Ticks Since System Boot /**
* @brief Ticks Since System Boot
* *
* This contains the number of ticks since the system was booted. * This contains the number of ticks since the system was booted.
*/ */
SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot; SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot;
/** @brief Watchdog Nanoseconds Since Last Tick Handler /**
* @brief Watchdog Nanoseconds Since Last Tick Handler
* *
* This is a pointer to the optional BSP plugin to obtain the number * This is a pointer to the optional BSP plugin to obtain the number
* of nanoseconds since the last clock tick. * of nanoseconds since the last clock tick.
@@ -173,19 +186,22 @@ SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot;
extern Watchdog_Nanoseconds_since_last_tick_routine extern Watchdog_Nanoseconds_since_last_tick_routine
_Watchdog_Nanoseconds_since_tick_handler; _Watchdog_Nanoseconds_since_tick_handler;
/** @brief Per Ticks Watchdog List /**
* @brief Per Ticks Watchdog List
* *
* This is the watchdog chain which is managed at ticks. * This is the watchdog chain which is managed at ticks.
*/ */
SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain; SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain;
/** @brief Per Seconds Watchdog List /**
* @brief Per Seconds Watchdog List
* *
* This is the watchdog chain which is managed at second boundaries. * This is the watchdog chain which is managed at second boundaries.
*/ */
SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain; SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain;
/** @brief Watchdog Handler Initialization /**
* @brief Watchdog Handler Initialization
* *
* This routine initializes the watchdog handler. The watchdog * This routine initializes the watchdog handler. The watchdog
* synchronization flag is initialized and the watchdog chains are * synchronization flag is initialized and the watchdog chains are
@@ -193,7 +209,8 @@ SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain;
*/ */
void _Watchdog_Handler_initialization( void ); void _Watchdog_Handler_initialization( void );
/** @brief Remove Watchdog from List /**
* @brief Remove Watchdog from List
* *
* This routine removes @a the_watchdog from the watchdog chain on which * This routine removes @a the_watchdog from the watchdog chain on which
* it resides and returns the state @a the_watchdog timer was in. * it resides and returns the state @a the_watchdog timer was in.
@@ -205,7 +222,8 @@ Watchdog_States _Watchdog_Remove (
Watchdog_Control *the_watchdog Watchdog_Control *the_watchdog
); );
/** @brief Watchdog Adjust /**
* @brief Watchdog Adjust
* *
* This routine adjusts the @a header watchdog chain in the forward * This routine adjusts the @a header watchdog chain in the forward
* or backward @a direction for @a units ticks. * or backward @a direction for @a units ticks.
@@ -220,7 +238,8 @@ void _Watchdog_Adjust (
Watchdog_Interval units Watchdog_Interval units
); );
/** @brief Watchdog Adjust to Chain /**
* @brief Watchdog Adjust to Chain
* *
* This routine adjusts the @a header watchdog chain in the forward * This routine adjusts the @a header watchdog chain in the forward
* @a direction for @a units_arg ticks. * @a direction for @a units_arg ticks.
@@ -239,7 +258,8 @@ void _Watchdog_Adjust_to_chain(
); );
/** @brief Watchdog Insert /**
* @brief Watchdog Insert
* *
* This routine inserts @a the_watchdog into the @a header watchdog chain * This routine inserts @a the_watchdog into the @a header watchdog chain
* for a time of @a units. * for a time of @a units.
@@ -252,7 +272,8 @@ void _Watchdog_Insert (
Watchdog_Control *the_watchdog Watchdog_Control *the_watchdog
); );
/** @brief Watchdog Tickle /**
* @brief Watchdog Tickle
* *
* This routine is invoked at appropriate intervals to update * This routine is invoked at appropriate intervals to update
* the @a header watchdog chain. * the @a header watchdog chain.

View File

@@ -7,7 +7,7 @@
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -35,20 +35,23 @@ extern "C" {
#include <rtems/score/heap.h> #include <rtems/score/heap.h>
#include <rtems/score/interr.h> #include <rtems/score/interr.h>
/** @brief Executive Workspace Control /**
* @brief Executive Workspace Control
* *
* The is the heap control structure that used to manage the * The is the heap control structure that used to manage the
* RTEMS Executive Workspace. * RTEMS Executive Workspace.
*/ */
SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */ SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */
/** @brief Workspace Handler Initialization /**
* @brief Workspace Handler Initialization
* *
* This routine performs the initialization necessary for this handler. * This routine performs the initialization necessary for this handler.
*/ */
void _Workspace_Handler_initialization(void); void _Workspace_Handler_initialization(void);
/** @brief Allocate Memory from Workspace /**
* @brief Allocate Memory from Workspace
* *
* This routine returns the address of a block of memory of size * This routine returns the address of a block of memory of size
* bytes. If a block of the appropriate size cannot be allocated * bytes. If a block of the appropriate size cannot be allocated
@@ -62,7 +65,8 @@ void *_Workspace_Allocate(
size_t size size_t size
); );
/** @brief Free Memory to the Workspace /**
* @brief Free Memory to the Workspace
* *
* This function frees the specified block of memory. If the block * This function frees the specified block of memory. If the block
* belongs to the Workspace and can be successfully freed, then * belongs to the Workspace and can be successfully freed, then
@@ -79,7 +83,8 @@ void _Workspace_Free(
void *block void *block
); );
/** @brief Workspace Allocate or Fail with Fatal Error /**
* @brief Workspace Allocate or Fail with Fatal Error
* *
* This routine returns the address of a block of memory of @a size * This routine returns the address of a block of memory of @a size
* bytes. If a block of the appropriate size cannot be allocated * bytes. If a block of the appropriate size cannot be allocated