From 1a8fde6ca27afea19faf9bf6487d8aa20b4a8d41 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 6 Mar 1996 21:34:57 +0000 Subject: Removed prototyes for static inline routines and moved the comments into the inline implementation. The impetus for this was twofold. First, it is incorrect to have static inline prototypes when using the macro implementation. Second, this reduced the number of lines in the include files seen by rtems.h by about 2000 lines. Next we restricted visibility for the inline routines to inside the executive itself EXCEPT for a handful of objects. This reduced the number of include files included by rtems.h by 40 files and reduced the lines in the include files seen by rtems.h by about 6000 lines. In total, these reduced the compile time of the entire RTEMS tree by 20%. This results in about 8 minutes savings on the SparcStation 10 morgana. --- cpukit/score/include/rtems/score/chain.h | 278 +------------------------------ 1 file changed, 2 insertions(+), 276 deletions(-) (limited to 'cpukit/score/include/rtems/score/chain.h') diff --git a/cpukit/score/include/rtems/score/chain.h b/cpukit/score/include/rtems/score/chain.h index 1d6c8f1db4..6eed361e88 100644 --- a/cpukit/score/include/rtems/score/chain.h +++ b/cpukit/score/include/rtems/score/chain.h @@ -83,49 +83,6 @@ void _Chain_Initialize( unsigned32 node_size ); -/* - * _Chain_Initialize_empty - * - * DESCRIPTION: - * - * This routine initializes the specified chain to contain zero nodes. - * - */ - -STATIC INLINE void _Chain_Initialize_empty( - Chain_Control *the_chain -); - -/* - * _Chain_Are_nodes_equal - * - * DESCRIPTION: - * - * This function returns TRUE if LEFT and RIGHT are equal, - * and FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Are_nodes_equal( - Chain_Node *left, - Chain_Node *right -); - -/* - * _Chain_Extract_unprotected - * - * DESCRIPTION: - * - * This routine extracts the_node from the chain on which it resides. - * It does NOT disable interrupts to insure the atomicity of the - * extract operation. - * - */ - -STATIC INLINE void _Chain_Extract_unprotected( - Chain_Node *the_node -); - /* * _Chain_Extract * @@ -141,22 +98,6 @@ void _Chain_Extract( Chain_Node *the_node ); -/* - * _Chain_Get_unprotected - * - * DESCRIPTION: - * - * This function removes the first node from the_chain and returns - * a pointer to that node. If the_chain is empty, then NULL is returned. - * It does NOT disable interrupts to insure the atomicity of the - * get operation. - * - */ - -STATIC INLINE Chain_Node *_Chain_Get_unprotected( - Chain_Control *the_chain -); - /* * _Chain_Get * @@ -173,37 +114,6 @@ Chain_Node *_Chain_Get( Chain_Control *the_chain ); -/* - * _Chain_Get_first_unprotected - * - * DESCRIPTION: - * - * This function removes the first node from the_chain and returns - * a pointer to that node. It does NOT disable interrupts to insure - * the atomicity of the get operation. - * - */ - -STATIC INLINE Chain_Node *_Chain_Get_first_unprotected( - Chain_Control *the_chain -); - -/* - * _Chain_Insert_unprotected - * - * DESCRIPTION: - * - * This routine inserts the_node on a chain immediately following - * after_node. It does NOT disable interrupts to insure the atomicity - * of the extract operation. - * - */ - -STATIC INLINE void _Chain_Insert_unprotected( - Chain_Node *after_node, - Chain_Node *the_node -); - /* * _Chain_Insert * @@ -220,22 +130,6 @@ void _Chain_Insert( Chain_Node *the_node ); -/* - * _Chain_Append_unprotected - * - * DESCRIPTION: - * - * This routine appends the_node onto the end of the_chain. - * It does NOT disable interrupts to insure the atomicity of the - * append operation. - * - */ - -STATIC INLINE void _Chain_Append_unprotected( - Chain_Control *the_chain, - Chain_Node *the_node -); - /* * _Chain_Append * @@ -252,177 +146,9 @@ void _Chain_Append( Chain_Node *the_node ); -/* - * _Chain_Prepend_unprotected - * - * DESCRIPTION: - * - * This routine prepends the_node onto the front of the_chain. - * It does NOT disable interrupts to insure the atomicity of the - * prepend operation. - * - */ - -STATIC INLINE void _Chain_Prepend_unprotected( - Chain_Control *the_chain, - Chain_Node *the_node -); - -/* - * _Chain_Prepend - * - * DESCRIPTION: - * - * This routine prepends the_node onto the front of the_chain. - * It disables interrupts to insure the atomicity of the - * prepend operation. - * - */ - -STATIC INLINE void _Chain_Prepend( - Chain_Control *the_chain, - Chain_Node *the_node -); - -/* - * _Chain_Head - * - * DESCRIPTION: - * - * This function returns a pointer to the first node on the chain. - * - */ - -STATIC INLINE Chain_Node *_Chain_Head( - Chain_Control *the_chain -); - -/* - * _Chain_Tail - * - * DESCRIPTION: - * - * This function returns a pointer to the last node on the chain. - * - */ - -STATIC INLINE Chain_Node *_Chain_Tail( - Chain_Control *the_chain -); - -/* - * _Chain_Is_head - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the head of the_chain and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_head( - Chain_Control *the_chain, - Chain_Node *the_node -); - -/* - * _Chain_Is_tail - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the tail of the_chain and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_tail( - Chain_Control *the_chain, - Chain_Node *the_node -); - -/* - * _Chain_Is_first - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the first node on a chain and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_first( - Chain_Node *the_node -); - -/* - * _Chain_Is_last - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the last node on a chain and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_last( - Chain_Node *the_node -); - -/* - * _Chain_Is_empty - * - * DESCRIPTION: - * - * This function returns TRUE if there a no nodes on the_chain and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_empty( - Chain_Control *the_chain -); - -/* - * _Chain_Has_only_one_node - * - * DESCRIPTION: - * - * This function returns TRUE if there is only one node on the_chain and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Has_only_one_node( - Chain_Control *the_chain -); - -/* - * _Chain_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_chain is NULL and FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_null( - Chain_Control *the_chain -); - -/* - * _Chain_Is_null_node - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is NULL and FALSE otherwise. - * - */ - -STATIC INLINE boolean _Chain_Is_null_node( - Chain_Node *the_node -); - +#ifndef __RTEMS_APPLICATION__ #include +#endif #ifdef __cplusplus } -- cgit v1.2.3