diff options
Diffstat (limited to '')
20 files changed, 58 insertions, 2311 deletions
diff --git a/cpukit/score/include/rtems/score/address.h b/cpukit/score/include/rtems/score/address.h index be056f220a..ec5ec6b03e 100644 --- a/cpukit/score/include/rtems/score/address.h +++ b/cpukit/score/include/rtems/score/address.h @@ -21,83 +21,9 @@ extern "C" { #endif -/* - * _Addresses_Add_offset - * - * DESCRIPTION: - * - * This function is used to add an offset to a base address. - * It returns the resulting address. This address is typically - * converted to an access type before being used further. - */ - -STATIC INLINE void *_Addresses_Add_offset ( - void *base, - unsigned32 offset -); - -/* - * _Addresses_Subtract_offset - * - * DESCRIPTION: - * - * This function is used to subtract an offset from a base - * address. It returns the resulting address. This address is - * typically converted to an access type before being used further. - */ - -STATIC INLINE void *_Addresses_Subtract_offset( - void *base, - unsigned32 offset -); - -/* - * _Addresses_Subtract - * - * DESCRIPTION: - * - * This function is used to subtract two addresses. It returns the - * resulting offset. - */ - -STATIC INLINE unsigned32 _Addresses_Subtract ( - void *left, - void *right -); - -/* - * _Addresses_Is_aligned - * - * DESCRIPTION: - * - * 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. - */ - -STATIC INLINE boolean _Addresses_Is_aligned ( - void *address -); - -/* - * _Addresses_Is_in_range - * - * DESCRIPTION: - * - * 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. - */ - -STATIC INLINE boolean _Addresses_Is_in_range ( - void *address, - void *base, - void *limit -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/address.inl> +#endif #ifdef __cplusplus } 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 @@ -84,49 +84,6 @@ void _Chain_Initialize( ); /* - * _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 * * DESCRIPTION: @@ -142,22 +99,6 @@ void _Chain_Extract( ); /* - * _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 * * DESCRIPTION: @@ -174,37 +115,6 @@ Chain_Node *_Chain_Get( ); /* - * _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 * * DESCRIPTION: @@ -221,22 +131,6 @@ void _Chain_Insert( ); /* - * _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 * * DESCRIPTION: @@ -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 <rtems/score/chain.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/coremsg.h b/cpukit/score/include/rtems/score/coremsg.h index 737004aeb8..b51e07ef61 100644 --- a/cpukit/score/include/rtems/score/coremsg.h +++ b/cpukit/score/include/rtems/score/coremsg.h @@ -196,41 +196,6 @@ unsigned32 _CORE_message_queue_Flush_support( ); /* - * _CORE_message_queue_send - * - * DESCRIPTION: - * - * This routine sends a message to the end of the specified message queue. - * - */ - -STATIC INLINE CORE_message_queue_Status _CORE_message_queue_Send( - CORE_message_queue_Control *the_message_queue, - void *buffer, - unsigned32 size, - Objects_Id id, - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support -); - -/* - * - * _CORE_message_queue_Urgent - * - * DESCRIPTION: - * - * This routine sends a message to the front of the specified message queue. - * - */ - -STATIC INLINE CORE_message_queue_Status _CORE_message_queue_Urgent( - CORE_message_queue_Control *the_message_queue, - void *buffer, - unsigned32 size, - Objects_Id id, - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support -); - -/* * * _CORE_message_queue_Broadcast * @@ -296,144 +261,9 @@ void _CORE_message_queue_Seize( Watchdog_Interval timeout ); -/* - * _CORE_message_queue_Allocate_message_buffer - * - * DESCRIPTION: - * - * This function allocates a message buffer from the inactive - * message buffer chain. - */ - -STATIC INLINE CORE_message_queue_Buffer_control * - _CORE_message_queue_Allocate_message_buffer ( - CORE_message_queue_Control *the_message_queue -); - -/* - * _CORE_message_queue_Free_message_buffer - * - * DESCRIPTION: - * - * This routine frees a message buffer to the inactive - * message buffer chain. - */ - -STATIC INLINE void _CORE_message_queue_Free_message_buffer ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -); - -/* - * _CORE_message_queue_Copy_buffer - * - * DESCRIPTION: - * - * This routine copies the contents of the source message buffer - * to the destination message buffer. - */ - -STATIC INLINE void _CORE_message_queue_Copy_buffer ( - void *source, - void *destination, - unsigned32 size -); - -/* - * _CORE_message_queue_Get_pending_message - * - * DESCRIPTION: - * - * This function removes the first message from the_message_queue - * and returns a pointer to it. - */ - -STATIC INLINE - CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( - CORE_message_queue_Control *the_message_queue -); - -/* - * _CORE_message_queue_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_message_queue_Is_priority( - CORE_message_queue_Attributes *the_attribute -); - -/* - * _CORE_message_queue_Append - * - * DESCRIPTION: - * - * This routine places the_message at the rear of the outstanding - * messages on the_message_queue. - */ - -STATIC INLINE void _CORE_message_queue_Append ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -); - -/* - * _CORE_message_queue_Prepend - * - * DESCRIPTION: - * - * This routine places the_message at the rear of the outstanding - * messages on the_message_queue. - */ - -STATIC INLINE void _CORE_message_queue_Prepend ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -); - -/* - * _CORE_message_queue_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_message_queue is TRUE and FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_message_queue_Is_null ( - CORE_message_queue_Control *the_message_queue -); - -/* - * _CORE_message_queue_Is_notify_enabled - * - * DESCRIPTION: - * - * This function returns TRUE if notification is enabled on this message - * queue and FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_message_queue_Is_notify_enabled ( - CORE_message_queue_Control *the_message_queue -); - -/* - * _CORE_message_queue_Set_notify - * - * DESCRIPTION: - * - * This routine initializes the notification information for the_message_queue. - */ - -STATIC INLINE void _CORE_message_queue_Set_notify ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Notify_Handler the_handler, - void *the_argument -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/coremsg.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h index 2e8d16a0c1..73b7e34417 100644 --- a/cpukit/score/include/rtems/score/coremutex.h +++ b/cpukit/score/include/rtems/score/coremutex.h @@ -158,85 +158,9 @@ void _CORE_mutex_Flush( unsigned32 status ); -/* - * _CORE_mutex_Is_locked - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex specified is locked and FALSE - * otherwise. - */ - -STATIC INLINE boolean _CORE_mutex_Is_locked( - CORE_mutex_Control *the_mutex -); - -/* - * _CORE_mutex_Is_fifo - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is FIFO and FALSE - * otherwise. - */ - -STATIC INLINE boolean _CORE_mutex_Is_fifo( - CORE_mutex_Attributes *the_attribute -); - -/* - * _CORE_mutex_Is_priority - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is PRIORITY and - * FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_mutex_Is_priority( - CORE_mutex_Attributes *the_attribute -); - -/* - * _CORE_mutex_Is_inherit_priority - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is - * INHERIT_PRIORITY and FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_mutex_Is_inherit_priority( - CORE_mutex_Attributes *the_attribute -); - -/* - * _CORE_mutex_Is_priority_ceiling - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is - * PRIORITY_CEILING and FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_mutex_Is_priority_ceiling( - CORE_mutex_Attributes *the_attribute -); - -/* - * _CORE_mutex_Is_nesting_allowed - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex allows a task to obtain a - * semaphore more than once and nest. - */ - -STATIC INLINE boolean _CORE_mutex_Is_nesting_allowed( - CORE_mutex_Attributes *the_attribute -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/coremutex.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/coresem.h b/cpukit/score/include/rtems/score/coresem.h index cf40da4783..88f712be5d 100644 --- a/cpukit/score/include/rtems/score/coresem.h +++ b/cpukit/score/include/rtems/score/coresem.h @@ -143,32 +143,9 @@ void _CORE_semaphore_Flush( unsigned32 status ); -/* - * _CORE_semaphore_Get_count - * - * DESCRIPTION: - * - * This routine returns the current count associated with the semaphore. - */ - -STATIC INLINE unsigned32 _CORE_semaphore_Get_count( - CORE_semaphore_Control *the_semaphore -); - -/* - * _CORE_semaphore_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -STATIC INLINE boolean _CORE_semaphore_Is_priority( - CORE_semaphore_Attributes *the_attribute -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/coresem.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h index dd50a0de8a..c1a0650d0a 100644 --- a/cpukit/score/include/rtems/score/heap.h +++ b/cpukit/score/include/rtems/score/heap.h @@ -214,189 +214,9 @@ void _Heap_Walk( boolean do_dump ); -/* - * _Heap_Head - * - * DESCRIPTION: - * - * This function returns the head of the specified heap. - */ - -STATIC INLINE Heap_Block *_Heap_Head ( - Heap_Control *the_heap -); - -/* - * _Heap_Tail - * - * DESCRIPTION: - * - * This function returns the tail of the specified heap. - */ - -STATIC INLINE Heap_Block *_Heap_Tail ( - Heap_Control *the_heap -); - -/* - * _Heap_Previous_block - * - * DESCRIPTION: - * - * This function returns the address of the block which physically - * precedes the_block in memory. - */ - -STATIC INLINE Heap_Block *_Heap_Previous_block ( - Heap_Block *the_block -); - -/* - * _Heap_Next_block - * - * DESCRIPTION: - * - * This function returns the address of the block which physically - * follows the_block in memory. - */ - -STATIC INLINE Heap_Block *_Heap_Next_block ( - Heap_Block *the_block -); - -/* - * _Heap_Block_at - * - * DESCRIPTION: - * - * This function calculates and returns a block's location (address) - * in the heap based upad a base address and an offset. - */ - -STATIC INLINE Heap_Block *_Heap_Block_at( - void *base, - unsigned32 offset -); - -/*PAGE - * - * _Heap_User_block_at - * - */ - -STATIC INLINE Heap_Block *_Heap_User_block_at( - void *base -); - -/* - * _Heap_Is_previous_block_free - * - * DESCRIPTION: - * - * This function returns TRUE if the previous block of the_block - * is free, and FALSE otherwise. - */ - -STATIC INLINE boolean _Heap_Is_previous_block_free ( - Heap_Block *the_block -); - -/* - * _Heap_Is_block_free - * - * DESCRIPTION: - * - * This function returns TRUE if the block is free, and FALSE otherwise. - */ - -STATIC INLINE boolean _Heap_Is_block_free ( - Heap_Block *the_block -); - -/* - * _Heap_Is_block_used - * - * DESCRIPTION: - * - * This function returns TRUE if the block is currently allocated, - * and FALSE otherwise. - */ - -STATIC INLINE boolean _Heap_Is_block_used ( - Heap_Block *the_block -); - -/* - * _Heap_Block_size - * - * DESCRIPTION: - * - * This function returns the size of the_block in bytes. - */ - -STATIC INLINE unsigned32 _Heap_Block_size ( - Heap_Block *the_block -); - -/* - * _Heap_Start_of_user_area - * - * DESCRIPTION: - * - * This function returns the starting address of the portion of the block - * which the user may access. - */ - -STATIC INLINE void *_Heap_Start_of_user_area ( - Heap_Block *the_block -); - -/* - * _Heap_Is_block_in - * - * DESCRIPTION: - * - * This function returns TRUE if the_block is within the memory area - * managed by the_heap, and FALSE otherwise. - */ - -STATIC INLINE boolean _Heap_Is_block_in ( - Heap_Control *the_heap, - Heap_Block *the_block -); - - -/* - * _Heap_Is_page_size_valid - * - * DESCRIPTION: - * - * This function validates a specified heap page size. If the page size - * is 0 or if lies outside a page size alignment boundary it is invalid - * and FALSE is returned. Otherwise, the page size is valid and TRUE is - * returned. - */ - -STATIC INLINE boolean _Heap_Is_page_size_valid( - unsigned32 page_size -); - -/* - * _Heap_Build_flag - * - * DESCRIPTION: - * - * This function returns the block flag composed of size and in_use_flag. - * The flag returned is suitable for use as a back or front flag in a - * heap block. - */ - -STATIC INLINE unsigned32 _Heap_Build_flag ( - unsigned32 size, - unsigned32 in_use_flag -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/heap.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/isr.h b/cpukit/score/include/rtems/score/isr.h index bb80823cfb..e42d7b888e 100644 --- a/cpukit/score/include/rtems/score/isr.h +++ b/cpukit/score/include/rtems/score/isr.h @@ -141,19 +141,6 @@ void _ISR_Handler_initialization ( void ); _CPU_ISR_Flash( _level ) /* - * _ISR_Is_in_progress - * - * DESCRIPTION: - * - * This function returns TRUE if the processor is currently servicing - * and interrupt and FALSE otherwise. A return value of TRUE indicates - * that the caller is an interrupt service routine, NOT a thread. The - * directives available to an interrupt service routine are restricted. - */ - -STATIC INLINE boolean _ISR_Is_in_progress( void ); - -/* * _ISR_Install_vector * * DESCRIPTION: @@ -191,32 +178,6 @@ STATIC INLINE boolean _ISR_Is_in_progress( void ); _CPU_ISR_Set_level( _new_level ) /* - * _ISR_Is_vector_number_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the vector is a valid vector number - * for this processor and FALSE otherwise. - */ - -STATIC INLINE boolean _ISR_Is_vector_number_valid ( - ISR_Vector_number vector -); - -/* - * _ISR_Is_valid_user_handler - * - * DESCRIPTION: - * - * This function returns TRUE if handler is the entry point of a valid - * use interrupt service routine and FALSE otherwise. - */ - -STATIC INLINE boolean _ISR_Is_valid_user_handler ( - void *handler -); - -/* * _ISR_Handler * * DESCRIPTION: @@ -253,7 +214,9 @@ void _ISR_Handler( void ); void _ISR_Dispatch( void ); +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/isr.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/mppkt.h b/cpukit/score/include/rtems/score/mppkt.h index 37469d93b8..0c651bc4e8 100644 --- a/cpukit/score/include/rtems/score/mppkt.h +++ b/cpukit/score/include/rtems/score/mppkt.h @@ -88,33 +88,9 @@ typedef struct { #define MP_PACKET_MINIMUN_HETERO_CONVERSION ( sizeof( MP_packet_Prefix ) / 4 ) -/* - * _Mp_packet_Is_valid_packet_class - * - * DESCRIPTION: - * - * This function returns TRUE if the the_packet_class is valid, - * and FALSE otherwise. - */ - -STATIC INLINE boolean _Mp_packet_Is_valid_packet_class ( - MP_packet_Classes the_packet_class -); - -/* - * _Mp_packet_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the the_packet_class is null, - * and FALSE otherwise. - */ - -STATIC INLINE boolean _Mp_packet_Is_null ( - MP_packet_Prefix *the_packet -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/mppkt.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 2c93a44379..d70009c3c9 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -383,176 +383,9 @@ Objects_Information *_Objects_Get_information( ); /* - * _Objects_Build_id - * - * DESCRIPTION: - * - * This function builds an object's id from the processor node and index - * values specified. - * - */ - -STATIC INLINE Objects_Id _Objects_Build_id( - Objects_Classes the_class, - unsigned32 node, - unsigned32 index -); - -/* - * _Objects_Get_class - * - * DESCRIPTION: - * - * This function returns the class portion of the ID. - * - */ - -STATIC INLINE Objects_Classes _Objects_Get_class( - Objects_Id id -); - -/* - * _Objects_Get_node - * - * DESCRIPTION: - * - * This function returns the node portion of the ID. - * - */ - -STATIC INLINE unsigned32 _Objects_Get_node( - Objects_Id id -); - -/* - * _Objects_Get_index - * - * DESCRIPTION: - * - * This function returns the index portion of the ID. - * - */ - -STATIC INLINE unsigned32 _Objects_Get_index( - Objects_Id id -); - -/* - * _Objects_Is_class_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the class is valid. - * - */ - -STATIC INLINE boolean _Objects_Is_class_valid( - Objects_Classes the_class -); - -/* - * _Objects_Is_local_node - * - * DESCRIPTION: - * - * This function returns TRUE if the node is of the local object, and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Objects_Is_local_node( - unsigned32 node -); - -/* - * _Objects_Is_local_id - * - * DESCRIPTION: - * - * This function returns TRUE if the id is of a local object, and - * FALSE otherwise. - * - */ - -STATIC INLINE boolean _Objects_Is_local_id( - Objects_Id id -); - -/* - * _Objects_Are_ids_equal - * - * DESCRIPTION: - * - * This function returns TRUE if left and right are equal, - * and FALSE otherwise. - * - */ - -STATIC INLINE boolean _Objects_Are_ids_equal( - Objects_Id left, - Objects_Id right -); - -/* - * _Objects_Allocate - * - * DESCRIPTION: - * - * This function allocates a object control block from - * the inactive chain of free object control blocks. - * - */ - -STATIC INLINE Objects_Control *_Objects_Allocate( - Objects_Information *information -); - -/* - * _Objects_Free - * - * DESCRIPTION: - * - * This function frees a object control block to the - * inactive chain of free object control blocks. - * - */ - -STATIC INLINE void _Objects_Free( - Objects_Information *information, - Objects_Control *the_object -); - -/* - * _Objects_Open - * - * DESCRIPTION: - * - * This function places the_object control pointer and object name - * in the Local Pointer and Local Name Tables, respectively. - * + * Pieces of object.inl are promoted out to the user */ -STATIC INLINE void _Objects_Open( - Objects_Information *information, - Objects_Control *the_object, - Objects_Name name -); - -/* - * _Objects_Close - * - * DESCRIPTION: - * - * This function removes the_object control pointer and object name - * in the Local Pointer and Local Name Tables. - * - */ - -STATIC INLINE void _Objects_Close( - Objects_Information *information, - Objects_Control *the_object -); - #include <rtems/score/object.inl> #include <rtems/score/objectmp.h> diff --git a/cpukit/score/include/rtems/score/objectmp.h b/cpukit/score/include/rtems/score/objectmp.h index dbd468e169..96496656df 100644 --- a/cpukit/score/include/rtems/score/objectmp.h +++ b/cpukit/score/include/rtems/score/objectmp.h @@ -47,42 +47,6 @@ void _Objects_MP_Handler_initialization ( unsigned32 maximum_global_objects ); -/* - * _Objects_MP_Allocate_global_object - * - * DESCRIPTION: - * - * This function allocates a Global Object control block. - */ - -STATIC INLINE Objects_MP_Control *_Objects_MP_Allocate_global_object ( - void -); - -/* - * _Objects_MP_Free_global_object - * - * DESCRIPTION: - * - * This routine deallocates a Global Object control block. - */ - -STATIC INLINE void _Objects_MP_Free_global_object ( - Objects_MP_Control *the_object -); - -/* - * _Objects_MP_Is_null_global_object - * - * DESCRIPTION: - * - * This function returns whether the global object is NULL or not. - */ - -STATIC INLINE boolean _Objects_MP_Is_null_global_object ( - Objects_MP_Control *the_object -); - /*PAGE * * _Objects_MP_Open @@ -176,7 +140,9 @@ void _Objects_MP_Is_remote ( EXTERN unsigned32 _Objects_MP_Maximum_global_objects; EXTERN Chain_Control _Objects_MP_Inactive_global_objects; +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/objectmp.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/priority.h b/cpukit/score/include/rtems/score/priority.h index a4a96045d5..b7de14f0f9 100644 --- a/cpukit/score/include/rtems/score/priority.h +++ b/cpukit/score/include/rtems/score/priority.h @@ -67,164 +67,26 @@ EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; */ /* - * _Priority_Handler_initialization + * Priority Bitfield Manipulation Routines * - * DESCRIPTION: + * NOTE: * - * This routine performs the initialization necessary for this handler. - */ - -STATIC INLINE void _Priority_Handler_initialization( void ); - -/* - * _Priority_Is_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the_priority if valid for a - * user task, and FALSE otherwise. - */ - -STATIC INLINE boolean _Priority_Is_valid ( - Priority_Control the_priority -); - -/* - * _Priority_Major - * - * DESCRIPTION: - * - * This function returns the major portion of the_priority. - */ - -STATIC INLINE unsigned32 _Priority_Major ( - Priority_Control the_priority -); - -/* - * _Priority_Minor - * - * DESCRIPTION: - * - * This function returns the minor portion of the_priority. - */ - -STATIC INLINE unsigned32 _Priority_Minor ( - Priority_Control the_priority -); - -/* - * _Priority_Mask - * - * DESCRIPTION: - * - * This function returns the mask associated with the major or minor - * number passed to it. + * These may simply be pass throughs to CPU dependent routines. */ -#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) - -STATIC INLINE unsigned32 _Priority_Mask ( - unsigned32 bit_number -); - -#else +#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) #define _Priority_Mask( _bit_number ) \ _CPU_Priority_Mask( _bit_number ) -#endif - -/* - * _Priority_Bits_index - * - * DESCRIPTION: - * - * 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. - */ - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) - -STATIC INLINE unsigned32 _Priority_Bits_index ( - unsigned32 bit_number -); - -#else - #define _Priority_Bits_index( _priority ) \ _CPU_Priority_bits_index( _priority ) #endif -/* - * _Priority_Add_to_bit_map - * - * DESCRIPTION: - * - * This routine uses the_priority_map to update the priority - * bit maps to indicate that a thread has been readied. - */ - -STATIC INLINE void _Priority_Add_to_bit_map ( - Priority_Information *the_priority_map -); - -/* - * _Priority_Remove_from_bit_map - * - * DESCRIPTION: - * - * This routine uses the_priority_map to update the priority - * bit maps to indicate that a thread has been removed from the - * ready state. - */ - -STATIC INLINE void _Priority_Remove_from_bit_map ( - Priority_Information *the_priority_map -); - -/* - * _Priority_Get_highest - * - * DESCRIPTION: - * - * This function returns the priority of the highest priority - * ready thread. - */ - -STATIC INLINE Priority_Control _Priority_Get_highest( void ); - -/* - * _Priority_Initialize_information - * - * DESCRIPTION: - * - * This routine initializes the_priority_map so that it - * contains the information necessary to manage a thread - * at new_priority. - */ - -STATIC INLINE void _Priority_Initialize_information( - Priority_Information *the_priority_map, - Priority_Control new_priority -); - -/* - * _Priority_Is_group_empty - * - * DESCRIPTION: - * - * This function returns TRUE if the priority GROUP is empty, and - * FALSE otherwise. - */ - -STATIC INLINE boolean _Priority_Is_group_empty ( - Priority_Control the_priority -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/priority.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/stack.h b/cpukit/score/include/rtems/score/stack.h index a054dae3df..bf72782b42 100644 --- a/cpukit/score/include/rtems/score/stack.h +++ b/cpukit/score/include/rtems/score/stack.h @@ -38,54 +38,9 @@ typedef struct { void *area; /* low memory addr of stack */ } Stack_Control; -/* - * _Stack_Initialize - * - * DESCRIPTION: - * - * This routine initializes the_stack record to indicate that - * size bytes of memory starting at starting_address have been - * reserved for a stack. - */ - -STATIC INLINE void _Stack_Initialize ( - Stack_Control *the_stack, - void *starting_address, - unsigned32 size -); - -/* - * _Stack_Is_enough - * - * DESCRIPTION: - * - * This function returns TRUE if size bytes is enough memory for - * a valid stack area on this processor, and FALSE otherwise. - */ - -STATIC INLINE boolean _Stack_Is_enough ( - unsigned32 size -); - -/* - * _Stack_Adjust_size - * - * DESCRIPTION: - * - * This function increases the stack size to insure that the thread - * has the desired amount of stack space after the initial stack - * pointer is determined based on alignment restrictions. - * - * NOTE: - * - * The amount of adjustment for alignment is CPU dependent. - */ - -STATIC INLINE unsigned32 _Stack_Adjust_size ( - unsigned32 size -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/stack.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/states.h b/cpukit/score/include/rtems/score/states.h index a120cadae3..1f8fd49fae 100644 --- a/cpukit/score/include/rtems/score/states.h +++ b/cpukit/score/include/rtems/score/states.h @@ -66,285 +66,9 @@ typedef unsigned32 States_Control; STATES_WAITING_FOR_EVENT | \ STATES_WAITING_ON_THREAD_QUEUE ) -/* - * _States_Set - * - * DESCRIPTION: - * - * This function sets the given states_to_set into the current_state - * passed in. The result is returned to the user in current_state. - */ - -STATIC INLINE States_Control _States_Set ( - States_Control states_to_set, - States_Control current_state -); - -/* - * _States_Clear - * - * DESCRIPTION: - * - * This function clears the given states_to_clear into the current_state - * passed in. The result is returned to the user in current_state. - */ - -STATIC INLINE States_Control _States_Clear ( - States_Control states_to_clear, - States_Control current_state -); - -/* - * _States_Is_ready - * - * DESCRIPTION: - * - * This function returns TRUE if the_states indicates that the - * state is READY, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_ready ( - States_Control the_states -); - -/* - * _States_Is_only_dormant - * - * DESCRIPTION: - * - * This function returns TRUE if the DORMANT state is the ONLY state - * set in the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_only_dormant ( - States_Control the_states -); - -/* - * _States_Is_dormant - * - * DESCRIPTION: - * - * This function returns TRUE if the DORMANT state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_dormant ( - States_Control the_states -); - -/* - * _States_Is_suspended - * - * DESCRIPTION: - * - * This function returns TRUE if the SUSPENDED state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_suspended ( - States_Control the_states -); - -/* - * _States_Is_Transient - * - * DESCRIPTION: - * - * This function returns TRUE if the TRANSIENT state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_transient ( - States_Control the_states -); - -/* - * _States_Is_delaying - * - * DESCRIPTION: - * - * This function returns TRUE if the DELAYING state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_delaying ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_buffer - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_BUFFER state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_buffer ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_segment - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_SEGMENT state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_segment ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_message - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_MESSAGE state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_message ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_event - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_EVENT state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_event ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_mutex - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_MUTEX state - * is set in the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_mutex ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_semaphore - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_SEMAPHORE state - * is set in the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_semaphore ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_time - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_TIME state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_time ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_rpc_reply - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_TIME state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_rpc_reply ( - States_Control the_states -); - -/* - * _States_Is_waiting_for_period - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_PERIOD state is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_for_period ( - States_Control the_states -); - -/* - * _States_Is_locally_blocked - * - * DESCRIPTION: - * - * This function returns TRUE if one of the states which indicates - * that a task is blocked waiting for a local resource is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_locally_blocked ( - States_Control the_states -); - -/* - * _States_Is_waiting_on_thread_queue - * - * DESCRIPTION: - * - * This function returns TRUE if one of the states which indicates - * that a task is blocked waiting for a local resource is set in - * the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_waiting_on_thread_queue ( - States_Control the_states -); - -/* - * _States_Is_blocked - * - * DESCRIPTION: - * - * This function returns TRUE if one of the states which indicates - * that a task is blocked is set in the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Is_blocked ( - States_Control the_states -); - -/* - * _States_Are_set - * - * DESCRIPTION: - * - * This function returns TRUE if any of the states in the mask - * are set in the_states, and FALSE otherwise. - */ - -STATIC INLINE boolean _States_Are_set ( - States_Control the_states, - States_Control mask -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/states.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h index c5d8562001..d7e43b2356 100644 --- a/cpukit/score/include/rtems/score/sysstate.h +++ b/cpukit/score/include/rtems/score/sysstate.h @@ -53,105 +53,9 @@ EXTERN boolean _System_state_Is_multiprocessing; EXTERN System_state_Codes _System_state_Current; /* - * _System_state_Handler_initialization - * - * DESCRIPTION: - * - * This routine initializes the system state handler. - */ - -STATIC INLINE void _System_state_Handler_initialization ( - boolean is_multiprocessing -); - -/* - * _System_state_Set - * - * DESCRIPTION: - * - * This routine sets the current system state to that specified by - * the called. + * Make it possible for the application to get the system state information. */ -STATIC INLINE void _System_state_Set ( - System_state_Codes state -); - -/* - * _System_state_Get - * - * DESCRIPTION: - * - * This function returns the current system state. - */ - -STATIC INLINE System_state_Codes _System_state_Get ( void ); - -/* - * _System_state_Is_before_initialization - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "before initialization" state, and FALSE otherwise. - */ - -STATIC INLINE boolean _System_state_Is_before_initialization ( - System_state_Codes state -); - -/* - * _System_state_Is_before_multitasking - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "before multitasking" state, and FALSE otherwise. - */ - -STATIC INLINE boolean _System_state_Is_before_multitasking ( - System_state_Codes state -); - -/* - * _System_state_Is_begin_multitasking - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "begin multitasking" state, and FALSE otherwise. - */ - -STATIC INLINE boolean _System_state_Is_begin_multitasking ( - System_state_Codes state -); - -/* - * _System_state_Is_up - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "up" state, and FALSE otherwise. - */ - -STATIC INLINE boolean _System_state_Is_up ( - System_state_Codes state -); - -/* - * _System_state_Is_failed - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "failed" state, and FALSE otherwise. - */ - -STATIC INLINE boolean _System_state_Is_failed ( - System_state_Codes state -); - #include <rtems/score/sysstate.inl> #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index d904df439b..8abf7c3584 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -284,28 +284,6 @@ void _Thread_Create_idle( void ); void _Thread_Start_multitasking( void ); /* - * _Thread_Stop_multitasking - * - * DESCRIPTION: - * - * This routine halts multitasking and returns control to - * the "thread" (i.e. the BSP) which initially invoked the - * routine which initialized the system. - */ - -STATIC INLINE void _Thread_Stop_multitasking( void ); - -/* - * _Thread_Dispatch_initialization - * - * DESCRIPTION: - * - * This routine initializes the thread dispatching subsystem. - */ - -STATIC INLINE void _Thread_Dispatch_initialization( void ); - -/* * _Thread_Dispatch * * DESCRIPTION: @@ -487,43 +465,6 @@ void _Thread_Tickle_timeslice( void ); void _Thread_Yield_processor( void ); /* - * _Thread_Is_executing - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is the currently executing - * thread, and FALSE otherwise. - */ - -STATIC INLINE boolean _Thread_Is_executing ( - Thread_Control *the_thread -); - -/* - * _Thread_Is_heir - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is the heir - * thread, and FALSE otherwise. - */ - -STATIC INLINE boolean _Thread_Is_executing ( - Thread_Control *the_thread -); - -/* - * _Thread_Is_executing_also_the_heir - * - * DESCRIPTION: - * - * This function returns TRUE if the currently executing thread - * is also the heir thread, and FALSE otherwise. - */ - -STATIC INLINE boolean _Thread_Is_executing_also_the_heir( void ); - -/* * _Thread_Load_environment * * DESCRIPTION: @@ -604,215 +545,6 @@ void _Thread_Set_priority( boolean _Thread_Evaluate_mode( void ); /* - * _Thread_Resume - * - * DESCRIPTION: - * - * This routine clears the SUSPENDED state for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -STATIC INLINE void _Thread_Resume ( - Thread_Control *the_thread -); - -/* - * _Thread_Unblock - * - * DESCRIPTION: - * - * This routine clears any blocking state for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -STATIC INLINE void _Thread_Unblock ( - Thread_Control *the_thread -); - -/* - * _Thread_Restart_self - * - * DESCRIPTION: - * - * This routine resets the current context of the calling thread - * to that of its initial state. - */ - -STATIC INLINE void _Thread_Restart_self( void ); - -/* - * _Thread_Calculate_heir - * - * DESCRIPTION: - * - * This function returns a pointer to the highest priority - * ready thread. - */ - -STATIC INLINE void _Thread_Calculate_heir( void ); - -/* - * _Thread_Is_allocated_fp - * - * DESCRIPTION: - * - * This function returns TRUE if the floating point context of - * the_thread is currently loaded in the floating point unit, and - * FALSE otherwise. - */ - -STATIC INLINE boolean _Thread_Is_allocated_fp ( - Thread_Control *the_thread -); - -/* - * _Thread_Deallocate_fp - * - * DESCRIPTION: - * - * This routine is invoked when the currently loaded floating - * point context is now longer associated with an active thread. - */ - -STATIC INLINE void _Thread_Deallocate_fp( void ); - -/* - * _Thread_Disable_dispatch - * - * DESCRIPTION: - * - * This routine prevents dispatching. - */ - -STATIC INLINE void _Thread_Disable_dispatch( void ); - -/* - * _Thread_Enable_dispatch - * - * DESCRIPTION: - * - * This routine allows dispatching to occur again. If this is - * the outer most dispatching critical section, then a dispatching - * operation will be performed and, if necessary, control of the - * processor will be transferred to the heir thread. - */ - -#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) - -STATIC INLINE void _Thread_Enable_dispatch(); - -#endif - -#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE ) - -void _Thread_Enable_dispatch( void ); - -#endif - -/* - * _Thread_Unnest_dispatch - * - * DESCRIPTION: - * - * This routine allows dispatching to occur again. However, - * no dispatching operation is performed even if this is the outer - * most dispatching critical section. - */ - -STATIC INLINE void _Thread_Unnest_dispatch( void ); - -/* - * _Thread_Is_dispatching_enabled - * - * DESCRIPTION: - * - * This function returns TRUE if dispatching is disabled, and FALSE - * otherwise. - */ - -STATIC INLINE boolean _Thread_Is_dispatching_enabled( void ); - -/* - * _Thread_Is_context_switch_necessary - * - * DESCRIPTION: - * - * This function returns TRUE if dispatching is disabled, and FALSE - * otherwise. - */ - -STATIC INLINE boolean _Thread_Is_context_switch_necessary( void ); - -/* - * _Thread_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is NULL and FALSE otherwise. - */ - -STATIC INLINE boolean _Thread_Is_null ( - Thread_Control *the_thread -); - -/* - * _Thread_Get - * - * DESCRIPTION: - * - * This function maps thread IDs to thread control - * blocks. If ID corresponds to a local thread, then it - * returns the_thread control pointer which maps to ID - * and location is set to OBJECTS_LOCAL. If the thread ID is - * global and resides on a remote node, then location is set - * to OBJECTS_REMOTE, and the_thread is undefined. - * Otherwise, location is set to OBJECTS_ERROR and - * the_thread is undefined. - */ - -STATIC INLINE Thread_Control *_Thread_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _Thread_Is_proxy_blocking - * - * DESCRIPTION: - * - * This function returns TRUE if the status code is equal to the - * status which indicates that a proxy is blocking, and FALSE otherwise. - */ - -STATIC INLINE boolean _Thread_Is_proxy_blocking ( - unsigned32 code -); - -/* - * _Thread_Internal_allocate - * - * DESCRIPTION: - * - * This routine allocates an internal thread. - */ - -STATIC INLINE Thread_Control *_Thread_Internal_allocate( void ); - -/* - * _Thread_Internal_free - * - * DESCRIPTION: - * - * This routine frees an internal thread. - */ - -STATIC INLINE void _Thread_Internal_free ( - Thread_Control *the_task -); - -/* * _Thread_Idle_body * * DESCRIPTION: @@ -826,7 +558,9 @@ Thread _Thread_Idle_body( ); #endif +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/thread.inl> +#endif #include <rtems/score/threadmp.h> #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/threadmp.h b/cpukit/score/include/rtems/score/threadmp.h index 4afc965381..0466a04065 100644 --- a/cpukit/score/include/rtems/score/threadmp.h +++ b/cpukit/score/include/rtems/score/threadmp.h @@ -26,8 +26,7 @@ extern "C" { * * DESCRIPTION: * - * This package is the specification for the Thread Handler's - * multiprocessing specific support routines. + * This routine initializes the multiprocessing portion of the Thread Handler. */ void _Thread_MP_Handler_initialization ( @@ -35,19 +34,6 @@ void _Thread_MP_Handler_initialization ( ); /* - * _Thread_MP_Is_receive - * - * DESCRIPTION: - * - * This function returns true if the thread in question is the - * multiprocessing receive thread. - */ - -STATIC INLINE boolean _Thread_MP_Is_receive ( - Thread_Control *the_thread -); - -/* * _Thread_MP_Allocate_proxy * * DESCRIPTION: @@ -64,19 +50,6 @@ Thread_Control *_Thread_MP_Allocate_proxy ( ); /* - * _Thread_MP_Free_proxy - * - * DESCRIPTION: - * - * This routine frees a proxy control block to the - * inactive chain of free proxy control blocks. - */ - -STATIC INLINE void _Thread_MP_Free_proxy ( - Thread_Control *the_thread -); - -/* * _Thread_MP_Find_proxy * * DESCRIPTION: @@ -104,7 +77,9 @@ EXTERN Thread_Control *_Thread_MP_Receive; EXTERN Chain_Control _Thread_MP_Active_proxies; EXTERN Chain_Control _Thread_MP_Inactive_proxies; +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/threadmp.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/tod.h b/cpukit/score/include/rtems/score/tod.h index 89ff118c33..b0fb686014 100644 --- a/cpukit/score/include/rtems/score/tod.h +++ b/cpukit/score/include/rtems/score/tod.h @@ -205,50 +205,6 @@ Watchdog_Interval _TOD_To_seconds( ); /* - * _TOD_Is_set - * - * DESCRIPTION: - * - * This function returns TRUE if the application has set the current - * time of day, and FALSE otherwise. - */ - -STATIC INLINE boolean _TOD_Is_set( void ); - -/* - * _TOD_Tickle_ticks - * - * DESCRIPTION: - * - * This routine increments the ticks field of the current time of - * day at each clock tick. - */ - -STATIC INLINE void _TOD_Tickle_ticks( void ); - -/* - * _TOD_Deactivate - * - * DESCRIPTION: - * - * This routine deactivates updating of the current time of day. - */ - -STATIC INLINE void _TOD_Deactivate( void ); - -/* - * _TOD_Activate - * - * DESCRIPTION: - * - * This routine deactivates updating of the current time of day. - */ - -STATIC INLINE void _TOD_Activate( - Watchdog_Interval ticks -); - -/* * _TOD_Tickle * * DESCRIPTION: @@ -292,7 +248,9 @@ void _TOD_Tickle( #define TOD_MILLISECONDS_TO_TICKS(_ms) \ (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick) +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/tod.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/tqdata.h b/cpukit/score/include/rtems/score/tqdata.h index a4a5551dfd..c9c9585f7f 100644 --- a/cpukit/score/include/rtems/score/tqdata.h +++ b/cpukit/score/include/rtems/score/tqdata.h @@ -48,11 +48,23 @@ typedef enum { } Thread_queue_States; /* - * The following record defines the control block used - * to manage each thread. + * The following constants are used to manage the priority queues. + * + * There are four chains used to maintain a priority -- each chain + * manages a distinct set of task priorities. The number of chains + * is determined by TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS. + * The following set must be consistent. + * + * The set below configures 4 headers -- each contains 64 priorities. + * Header x manages priority range (x*64) through ((x*64)+63). If + * the priority is more than half way through the priority range it + * is in, then the search is performed from the rear of the chain. + * This halves the search time to find the insertion point. */ -#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4 /* # of pri groups */ +#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4 +#define TASK_QUEUE_DATA_PRIORITIES_PER_HEADER 64 +#define TASK_QUEUE_DATA_REVERSE_SEARCH_MASK 0x20 typedef struct { union { @@ -67,47 +79,9 @@ typedef struct { unsigned32 count; } Thread_queue_Control; -/* - * _Thread_queue_Header_number - * - * DESCRIPTION: - * - * This function returns the index of the priority chain on which - * a thread of the_priority should be placed. - */ - -STATIC INLINE unsigned32 _Thread_queue_Header_number ( - Priority_Control the_priority -); - -/* - * _Thread_queue_Is_reverse_search - * - * DESCRIPTION: - * - * This function returns TRUE if the_priority indicates that the - * enqueue search should start at the front of this priority - * group chain, and FALSE if the search should start at the rear. - */ - -STATIC INLINE boolean _Thread_queue_Is_reverse_search ( - Priority_Control the_priority -); - -/* - * _Thread_queue_Enter_critical_section - * - * DESCRIPTION: - * - * This routine is invoked to indicate that the specified thread queue is - * entering a critical section. - */ - -STATIC INLINE void _Thread_queue_Enter_critical_section ( - Thread_queue_Control *the_thread_queue -); - +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/tqdata.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/userext.h b/cpukit/score/include/rtems/score/userext.h index 58fa087780..1a6ac3437e 100644 --- a/cpukit/score/include/rtems/score/userext.h +++ b/cpukit/score/include/rtems/score/userext.h @@ -108,56 +108,6 @@ EXTERN User_extensions_Control _User_extensions_Initial; EXTERN Chain_Control _User_extensions_List; - -/* - * _User_extensions_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -STATIC INLINE void _User_extensions_Handler_initialization ( - User_extensions_Table *initial_extensions -); - -/* - * _User_extensions_Add_set - * - * DESCRIPTION: - * - * This routine is used to add a user extension set to the active list. - */ - -STATIC INLINE void _User_extensions_Add_set ( - User_extensions_Control *the_extension, - User_extensions_Table *extension_table -); - -/* - * _User_extensions_Add_API_set - * - * DESCRIPTION: - * - * This routine is used to add an API extension set to the active list. - */ - -STATIC INLINE void _User_extensions_Add_API_set ( - User_extensions_Control *the_extension -); - -/* - * _User_extensions_Remove_set - * - * DESCRIPTION: - * - * This routine is used to remove a user extension set from the active list. - */ - -STATIC INLINE void _User_extensions_Remove_set ( - User_extensions_Control *the_extension -); - /* * _User_extensions_Thread_create * @@ -211,20 +161,6 @@ void _User_extensions_Thread_restart ( ); /* - * _User_extensions_Thread_switch - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension which - * is invoked when a context switch occurs. - */ - -STATIC INLINE void _User_extensions_Thread_switch ( - Thread_Control *executing, - Thread_Control *heir -); - -/* * _User_extensions_Thread_begin * * DESCRIPTION: @@ -265,7 +201,9 @@ void _User_extensions_Fatal ( unsigned32 the_error ); +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/userext.inl> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h index 5ac7eee641..9b13407c8e 100644 --- a/cpukit/score/include/rtems/score/watchdog.h +++ b/cpukit/score/include/rtems/score/watchdog.h @@ -116,24 +116,6 @@ EXTERN Chain_Control _Watchdog_Seconds_chain; void _Watchdog_Handler_initialization( void ); /* - * - * _Watchdog_Initialize - * - * DESCRIPTION: - * - * This routine initializes the specified watchdog. The watchdog is - * made inactive, the watchdog id and handler routine are set to the - * specified values. - */ - -STATIC INLINE void _Watchdog_Initialize( - Watchdog_Control *the_watchdog, - Watchdog_Service_routine_entry routine, - Objects_Id id, - void *user_data -); - -/* * _Watchdog_Remove * * DESCRIPTION: @@ -147,208 +129,6 @@ Watchdog_States _Watchdog_Remove ( ); /* - * - * _Watchdog_Is_active - * - * DESCRIPTION: - * - * This routine returns TRUE if the watchdog timer is in the ACTIVE - * state, and FALSE otherwise. - */ - -STATIC INLINE boolean _Watchdog_Is_active( - Watchdog_Control *the_watchdog -); - -/* - * - * _Watchdog_Activate - * - * DESCRIPTION: - * - * This routine activates THE_WATCHDOG timer which is already - * on a watchdog chain. - */ - -STATIC INLINE void _Watchdog_Activate( - Watchdog_Control *the_watchdog -); - -/* - * - * _Watchdog_Deactivate - * - * DESCRIPTION: - * - * This routine deactivates THE_WATCHDOG timer which will remain - * on a watchdog chain. - */ - -STATIC INLINE void _Watchdog_Deactivate( - Watchdog_Control *the_watchdog -); - -/* - * - * _Watchdog_Tickle_ticks - * - * DESCRIPTION: - * - * This routine is invoked at each clock tick to update the ticks - * watchdog chain. - */ - -STATIC INLINE void _Watchdog_Tickle_ticks( void ); - -/* - * - * _Watchdog_Tickle_seconds - * - * DESCRIPTION: - * - * This routine is invoked at each clock tick to update the seconds - * watchdog chain. - */ - -STATIC INLINE void _Watchdog_Tickle_seconds( void ); - -/* - * - * _Watchdog_Insert_ticks - * - * DESCRIPTION: - * - * 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. - */ - -STATIC INLINE void _Watchdog_Insert_ticks( - Watchdog_Control *the_watchdog, - Watchdog_Interval units -); - -/* - * - * _Watchdog_Insert_seconds - * - * DESCRIPTION: - * - * 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. - */ - -STATIC INLINE void _Watchdog_Insert_seconds( - Watchdog_Control *the_watchdog, - Watchdog_Interval units -); - -/* - * - * _Watchdog_Adjust_seconds - * - * DESCRIPTION: - * - * 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. - */ - -STATIC INLINE void _Watchdog_Adjust_seconds( - Watchdog_Adjust_directions direction, - Watchdog_Interval units -); - -/* - * - * _Watchdog_Adjust_ticks - * - * DESCRIPTION: - * - * This routine adjusts the ticks watchdog chain in the forward - * or backward DIRECTION for UNITS ticks. - */ - -STATIC INLINE void _Watchdog_Adjust_ticks( - Watchdog_Adjust_directions direction, - Watchdog_Interval units -); - -/* - * - * _Watchdog_Reset - * - * DESCRIPTION: - * - * 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. - */ - -STATIC INLINE void _Watchdog_Reset( - Watchdog_Control *the_watchdog -); - -/* - * - * _Watchdog_Next - * - * DESCRIPTION: - * - * This routine returns a pointer to the watchdog timer following - * THE_WATCHDOG on the watchdog chain. - */ - -STATIC INLINE Watchdog_Control *_Watchdog_Next( - Watchdog_Control *the_watchdog -); - -/* - * - * _Watchdog_Previous - * - * DESCRIPTION: - * - * This routine returns a pointer to the watchdog timer preceding - * THE_WATCHDOG on the watchdog chain. - */ - -STATIC INLINE Watchdog_Control *_Watchdog_Previous( - Watchdog_Control *the_watchdog -); - -/* - * - * _Watchdog_First - * - * DESCRIPTION: - * - * This routine returns a pointer to the first watchdog timer - * on the watchdog chain HEADER. - */ - -STATIC INLINE Watchdog_Control *_Watchdog_First( - Chain_Control *header -); - -/* - * - * _Watchdog_Last - * - * DESCRIPTION: - * - * This routine returns a pointer to the last watchdog timer - * on the watchdog chain HEADER. - */ -STATIC INLINE Watchdog_Control *_Watchdog_Last( - Chain_Control *header -); - -/* * _Watchdog_Adjust * * DESCRIPTION: @@ -393,7 +173,9 @@ void _Watchdog_Tickle ( Chain_Control *header ); +#ifndef __RTEMS_APPLICATION__ #include <rtems/score/watchdog.inl> +#endif #ifdef __cplusplus } |