From 2b3e9d9b244e279ef5693a7cf5dacc7903164af5 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 22 Jul 2002 09:46:48 +0000 Subject: Remove, moved to cpukit. --- c/src/exec/score/inline/.cvsignore | 2 - c/src/exec/score/inline/Makefile.am | 43 --- c/src/exec/score/inline/rtems/.cvsignore | 2 - c/src/exec/score/inline/rtems/score/.cvsignore | 2 - c/src/exec/score/inline/rtems/score/address.inl | 125 ------- c/src/exec/score/inline/rtems/score/chain.inl | 389 -------------------- c/src/exec/score/inline/rtems/score/coremsg.inl | 275 -------------- c/src/exec/score/inline/rtems/score/coremutex.inl | 196 ---------- c/src/exec/score/inline/rtems/score/coresem.inl | 107 ------ c/src/exec/score/inline/rtems/score/heap.inl | 273 -------------- c/src/exec/score/inline/rtems/score/isr.inl | 55 --- c/src/exec/score/inline/rtems/score/mppkt.inl | 57 --- c/src/exec/score/inline/rtems/score/object.inl | 315 ---------------- c/src/exec/score/inline/rtems/score/objectmp.inl | 72 ---- c/src/exec/score/inline/rtems/score/priority.inl | 246 ------------- c/src/exec/score/inline/rtems/score/stack.inl | 80 ---- c/src/exec/score/inline/rtems/score/states.inl | 383 ------------------- c/src/exec/score/inline/rtems/score/sysstate.inl | 153 -------- c/src/exec/score/inline/rtems/score/thread.inl | 427 ---------------------- c/src/exec/score/inline/rtems/score/threadmp.inl | 60 --- c/src/exec/score/inline/rtems/score/tod.inl | 66 ---- c/src/exec/score/inline/rtems/score/tqdata.inl | 72 ---- c/src/exec/score/inline/rtems/score/userext.inl | 169 --------- c/src/exec/score/inline/rtems/score/watchdog.inl | 323 ---------------- c/src/exec/score/inline/rtems/score/wkspace.inl | 56 --- 25 files changed, 3948 deletions(-) delete mode 100644 c/src/exec/score/inline/.cvsignore delete mode 100644 c/src/exec/score/inline/Makefile.am delete mode 100644 c/src/exec/score/inline/rtems/.cvsignore delete mode 100644 c/src/exec/score/inline/rtems/score/.cvsignore delete mode 100644 c/src/exec/score/inline/rtems/score/address.inl delete mode 100644 c/src/exec/score/inline/rtems/score/chain.inl delete mode 100644 c/src/exec/score/inline/rtems/score/coremsg.inl delete mode 100644 c/src/exec/score/inline/rtems/score/coremutex.inl delete mode 100644 c/src/exec/score/inline/rtems/score/coresem.inl delete mode 100644 c/src/exec/score/inline/rtems/score/heap.inl delete mode 100644 c/src/exec/score/inline/rtems/score/isr.inl delete mode 100644 c/src/exec/score/inline/rtems/score/mppkt.inl delete mode 100644 c/src/exec/score/inline/rtems/score/object.inl delete mode 100644 c/src/exec/score/inline/rtems/score/objectmp.inl delete mode 100644 c/src/exec/score/inline/rtems/score/priority.inl delete mode 100644 c/src/exec/score/inline/rtems/score/stack.inl delete mode 100644 c/src/exec/score/inline/rtems/score/states.inl delete mode 100644 c/src/exec/score/inline/rtems/score/sysstate.inl delete mode 100644 c/src/exec/score/inline/rtems/score/thread.inl delete mode 100644 c/src/exec/score/inline/rtems/score/threadmp.inl delete mode 100644 c/src/exec/score/inline/rtems/score/tod.inl delete mode 100644 c/src/exec/score/inline/rtems/score/tqdata.inl delete mode 100644 c/src/exec/score/inline/rtems/score/userext.inl delete mode 100644 c/src/exec/score/inline/rtems/score/watchdog.inl delete mode 100644 c/src/exec/score/inline/rtems/score/wkspace.inl (limited to 'c/src/exec/score/inline') diff --git a/c/src/exec/score/inline/.cvsignore b/c/src/exec/score/inline/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/exec/score/inline/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/exec/score/inline/Makefile.am b/c/src/exec/score/inline/Makefile.am deleted file mode 100644 index 392c18d4b0..0000000000 --- a/c/src/exec/score/inline/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## -## $Id$ -## - - -$(PROJECT_INCLUDE)/%: % - $(INSTALL_DATA) $< $@ - -include_rtems_scoredir = $(includedir)/rtems/score - -$(PROJECT_INCLUDE)/rtems/score: - @$(mkinstalldirs) $@ - -## We only build multiprocessing related files if HAS_MP was defined -MP_I_FILES = rtems/score/mppkt.inl rtems/score/objectmp.inl rtems/score/threadmp.inl - -STD_I_FILES = rtems/score/address.inl rtems/score/chain.inl \ - rtems/score/coremsg.inl rtems/score/coremutex.inl rtems/score/coresem.inl \ - rtems/score/heap.inl rtems/score/isr.inl rtems/score/object.inl \ - rtems/score/priority.inl rtems/score/stack.inl rtems/score/states.inl \ - rtems/score/sysstate.inl rtems/score/thread.inl rtems/score/tod.inl \ - rtems/score/tqdata.inl rtems/score/userext.inl rtems/score/watchdog.inl \ - rtems/score/wkspace.inl - -if HAS_MP -I_FILES = $(STD_I_FILES) $(MP_I_FILES) -else -I_FILES = $(STD_I_FILES) -endif - -if INLINE -include_rtems_score_HEADERS = $(I_FILES) - -PREINSTALL_FILES = $(PROJECT_INCLUDE)/rtems/score \ - $(include_rtems_score_HEADERS:%=$(PROJECT_INCLUDE)/%) - -endif - -all-local: $(PREINSTALL_FILES) - -EXTRA_DIST = $(STD_I_FILES) $(MP_I_FILES) - -include $(top_srcdir)/automake/local.am diff --git a/c/src/exec/score/inline/rtems/.cvsignore b/c/src/exec/score/inline/rtems/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/exec/score/inline/rtems/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/exec/score/inline/rtems/score/.cvsignore b/c/src/exec/score/inline/rtems/score/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/exec/score/inline/rtems/score/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/exec/score/inline/rtems/score/address.inl b/c/src/exec/score/inline/rtems/score/address.inl deleted file mode 100644 index 54f11c3ca4..0000000000 --- a/c/src/exec/score/inline/rtems/score/address.inl +++ /dev/null @@ -1,125 +0,0 @@ -/* inline/address.inl - * - * This include file contains the bodies of the routines - * about addresses which are inlined. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_ADDRESSES_inl -#define __INLINE_ADDRESSES_inl - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( - void *base, - unsigned32 offset -) -{ - return (void *)((char *)base + offset); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset ( - void *base, - unsigned32 offset -) -{ - return (void *)((char *)base - offset); -} - -/*PAGE - * - * _Addresses_Subtract - * - * DESCRIPTION: - * - * This function is used to subtract two addresses. It returns the - * resulting offset. - * - * NOTE: The cast of an address to an unsigned32 makes this code - * dependent on an addresses being thirty two bits. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Addresses_Subtract ( - void *left, - void *right -) -{ - return ((char *) left - (char *) right); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Addresses_Is_aligned ( - void *address -) -{ -#if (CPU_ALIGNMENT == 0) - return TRUE; -#elif defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES) - return ( ( (unsigned short)address % CPU_ALIGNMENT ) == 0 ); -#else - return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 ); -#endif -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Addresses_Is_in_range ( - void *address, - void *base, - void *limit -) -{ - return ( address >= base && address <= limit ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/chain.inl b/c/src/exec/score/inline/rtems/score/chain.inl deleted file mode 100644 index ca005fe0a9..0000000000 --- a/c/src/exec/score/inline/rtems/score/chain.inl +++ /dev/null @@ -1,389 +0,0 @@ -/* inline/chain.inl - * - * This include file contains the bodies of the routines which are - * associated with doubly linked chains and inlined. - * - * NOTE: The routines in this file are ordered from simple - * to complex. No other Chain Handler routine is referenced - * unless it has already been defined. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_CHAIN_inl -#define __INLINE_CHAIN_inl - -/*PAGE - * - * _Chain_Are_nodes_equal - * - * DESCRIPTION: - * - * This function returns TRUE if LEFT and RIGHT are equal, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Are_nodes_equal( - Chain_Node *left, - Chain_Node *right -) -{ - return left == right; -} - -/*PAGE - * - * _Chain_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_chain is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_null( - Chain_Control *the_chain -) -{ - return ( the_chain == NULL ); -} - -/*PAGE - * - * _Chain_Is_null_node - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_null_node( - Chain_Node *the_node -) -{ - return ( the_node == NULL ); -} - -/*PAGE - * - * _Chain_Head - * - * DESCRIPTION: - * - * This function returns a pointer to the first node on the chain. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( - Chain_Control *the_chain -) -{ - return (Chain_Node *) the_chain; -} - -/*PAGE - * - * _Chain_Tail - * - * DESCRIPTION: - * - * This function returns a pointer to the last node on the chain. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( - Chain_Control *the_chain -) -{ - return (Chain_Node *) &the_chain->permanent_null; -} - -/*PAGE - * - * _Chain_Is_empty - * - * DESCRIPTION: - * - * This function returns TRUE if there a no nodes on the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( - Chain_Control *the_chain -) -{ - return ( the_chain->first == _Chain_Tail( the_chain ) ); -} - -/*PAGE - * - * _Chain_Is_first - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the first node on a chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_first( - Chain_Node *the_node -) -{ - return ( the_node->previous == NULL ); -} - -/*PAGE - * - * _Chain_Is_last - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the last node on a chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_last( - Chain_Node *the_node -) -{ - return ( the_node->next == NULL ); -} - -/*PAGE - * - * _Chain_Has_only_one_node - * - * DESCRIPTION: - * - * This function returns TRUE if there is only one node on the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Has_only_one_node( - Chain_Control *the_chain -) -{ - return ( the_chain->first == the_chain->last ); -} - -/*PAGE - * - * _Chain_Is_head - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the head of the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_head( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - return ( the_node == _Chain_Head( the_chain ) ); -} - -/*PAGE - * - * _Chain_Is_tail - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the tail of the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_tail( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - return ( the_node == _Chain_Tail( the_chain ) ); -} - -/*PAGE - * - * Chain_Initialize_empty - * - * DESCRIPTION: - * - * This routine initializes the specified chain to contain zero nodes. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( - Chain_Control *the_chain -) -{ - the_chain->first = _Chain_Tail( the_chain ); - the_chain->permanent_null = NULL; - the_chain->last = _Chain_Head( the_chain ); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Extract_unprotected( - Chain_Node *the_node -) -{ - Chain_Node *next; - Chain_Node *previous; - - next = the_node->next; - previous = the_node->previous; - next->previous = previous; - previous->next = next; -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( - Chain_Control *the_chain -) -{ - Chain_Node *return_node; - Chain_Node *new_first; - - return_node = the_chain->first; - new_first = return_node->next; - the_chain->first = new_first; - new_first->previous = _Chain_Head( the_chain ); - - return return_node; -} - -/*PAGE - * - * 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. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( - Chain_Control *the_chain -) -{ - if ( !_Chain_Is_empty( the_chain ) ) - return _Chain_Get_first_unprotected( the_chain ); - else - return NULL; -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Insert_unprotected( - Chain_Node *after_node, - Chain_Node *the_node -) -{ - Chain_Node *before_node; - - the_node->previous = after_node; - before_node = after_node->next; - after_node->next = the_node; - the_node->next = before_node; - before_node->previous = the_node; -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - Chain_Node *old_last_node; - - the_node->next = _Chain_Tail( the_chain ); - old_last_node = the_chain->last; - the_chain->last = the_node; - old_last_node->next = the_node; - the_node->previous = old_last_node; -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node ); - -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Prepend( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - _Chain_Insert( _Chain_Head( the_chain ), the_node ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/coremsg.inl b/c/src/exec/score/inline/rtems/score/coremsg.inl deleted file mode 100644 index 2f6fe5e877..0000000000 --- a/c/src/exec/score/inline/rtems/score/coremsg.inl +++ /dev/null @@ -1,275 +0,0 @@ -/* coremsg.inl - * - * This include file contains the static inline implementation of all - * inlined routines in the Core Message Handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __CORE_MESSAGE_QUEUE_inl -#define __CORE_MESSAGE_QUEUE_inl - -#include /* needed for memcpy */ - -/*PAGE - * - * _CORE_message_queue_Send - * - * DESCRIPTION: - * - * This routine sends a message to the end of the specified message queue. - */ - -RTEMS_INLINE_ROUTINE 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, - boolean wait, - Watchdog_Interval timeout -) -{ - return _CORE_message_queue_Submit( - the_message_queue, - buffer, - size, - id, -#if defined(RTEMS_MULTIPROCESSING) - api_message_queue_mp_support, -#else - NULL, -#endif - CORE_MESSAGE_QUEUE_SEND_REQUEST, - wait, /* sender may block */ - timeout /* timeout interval */ - ); -} - -/*PAGE - * - * _CORE_message_queue_Urgent - * - * DESCRIPTION: - * - * This routine sends a message to the front of the specified message queue. - */ - -RTEMS_INLINE_ROUTINE 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, - boolean wait, - Watchdog_Interval timeout -) -{ - return _CORE_message_queue_Submit( - the_message_queue, - buffer, - size, - id, -#if defined(RTEMS_MULTIPROCESSING) - api_message_queue_mp_support, -#else - NULL, -#endif - CORE_MESSAGE_QUEUE_URGENT_REQUEST, - wait, /* sender may block */ - timeout /* timeout interval */ - ); -} - -/*PAGE - * - * _CORE_message_queue_Copy_buffer - * - * DESCRIPTION: - * - * This routine copies the contents of the source message buffer - * to the destination message buffer. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer ( - void *source, - void *destination, - unsigned32 size -) -{ - memcpy(destination, source, size); -} - -/*PAGE - * - * _CORE_message_queue_Allocate_message_buffer - * - * DESCRIPTION: - * - * This function allocates a message buffer from the inactive - * message buffer chain. - */ - -RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * -_CORE_message_queue_Allocate_message_buffer ( - CORE_message_queue_Control *the_message_queue -) -{ - return (CORE_message_queue_Buffer_control *) - _Chain_Get( &the_message_queue->Inactive_messages ); -} - -/*PAGE - * - * _CORE_message_queue_Free_message_buffer - * - * DESCRIPTION: - * - * This routine frees a message buffer to the inactive - * message buffer chain. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -) -{ - _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); -} - -/*PAGE - * - * _CORE_message_queue_Get_pending_message - * - * DESCRIPTION: - * - * This function removes the first message from the_message_queue - * and returns a pointer to it. - */ - -RTEMS_INLINE_ROUTINE - CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( - CORE_message_queue_Control *the_message_queue -) -{ - return (CORE_message_queue_Buffer_control *) - _Chain_Get_unprotected( &the_message_queue->Pending_messages ); -} - -/*PAGE - * - * _CORE_message_queue_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_priority( - CORE_message_queue_Attributes *the_attribute -) -{ - return (the_attribute->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY); -} - -/*PAGE - * - * _CORE_message_queue_Append - * - * DESCRIPTION: - * - * This routine places the_message at the rear of the outstanding - * messages on the_message_queue. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Append ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -) -{ - _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node ); -} - -/*PAGE - * - * _CORE_message_queue_Prepend - * - * DESCRIPTION: - * - * This routine places the_message at the front of the outstanding - * messages on the_message_queue. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -) -{ - _Chain_Prepend( - &the_message_queue->Pending_messages, - &the_message->Node - ); -} - -/*PAGE - * - * _CORE_message_queue_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_message_queue is TRUE and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_null ( - CORE_message_queue_Control *the_message_queue -) -{ - return ( the_message_queue == NULL ); -} - -/*PAGE - * - * _CORE_message_queue_Is_notify_enabled - * - * DESCRIPTION: - * - * This function returns TRUE if notification is enabled on this message - * queue and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_notify_enabled ( - CORE_message_queue_Control *the_message_queue -) -{ - return (the_message_queue->notify_handler != NULL); -} - -/*PAGE - * - * _CORE_message_queue_Set_notify - * - * DESCRIPTION: - * - * This routine initializes the notification information for the_message_queue. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Notify_Handler the_handler, - void *the_argument -) -{ - the_message_queue->notify_handler = the_handler; - the_message_queue->notify_argument = the_argument; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/coremutex.inl b/c/src/exec/score/inline/rtems/score/coremutex.inl deleted file mode 100644 index b57b2ef2f4..0000000000 --- a/c/src/exec/score/inline/rtems/score/coremutex.inl +++ /dev/null @@ -1,196 +0,0 @@ -/* inline/coremutex.inl - * - * This include file contains all of the inlined routines associated - * with the CORE mutexes. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_CORE_MUTEX_inl -#define __INLINE_CORE_MUTEX_inl - -/*PAGE - * - * _CORE_mutex_Is_locked - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex specified is locked and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_locked( - CORE_mutex_Control *the_mutex -) -{ - return the_mutex->lock == CORE_MUTEX_LOCKED; -} - -/*PAGE - * - * _CORE_mutex_Is_fifo - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is FIFO and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_fifo( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_FIFO; -} - -/*PAGE - * - * _CORE_mutex_Is_priority - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is PRIORITY and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY; -} - -/*PAGE - * - * _CORE_mutex_Is_inherit_priority - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is - * INHERIT_PRIORITY and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; -} - -/*PAGE - * - * _CORE_mutex_Is_priority_ceiling - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is - * PRIORITY_CEILING and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority_ceiling( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; -} - -/*PAGE - * - * _CORE_mutex_Seize_interrupt_trylock - * - * DESCRIPTION: - * - * This routine returns 0 if "trylock" can resolve whether or not the - * mutex is immediately obtained or there was an error attempting to - * get it. It returns 1 to indicate that the caller cannot obtain - * the mutex and will have to block to do so. - * - * NOTE: There is no MACRO version of this routine. - * A body is in coremutexseize.c that is duplicated - * from the .inl by hand. - */ - -RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock( - CORE_mutex_Control *the_mutex, - ISR_Level *level_p -) -{ - Thread_Control *executing; - ISR_Level level = *level_p; - - /* disabled when you get here */ - - executing = _Thread_Executing; - executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; - if ( !_CORE_mutex_Is_locked( the_mutex ) ) { - the_mutex->lock = CORE_MUTEX_LOCKED; - the_mutex->holder = executing; - the_mutex->holder_id = executing->Object.id; - the_mutex->nest_count = 1; - if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || - _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) - executing->resource_count++; - if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { - _ISR_Enable( level ); - return 0; - } - /* else must be CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING */ - { - Priority_Control ceiling; - Priority_Control current; - - ceiling = the_mutex->Attributes.priority_ceiling; - current = executing->current_priority; - if ( current == ceiling ) { - _ISR_Enable( level ); - return 0; - } - if ( current > ceiling ) { - _Thread_Disable_dispatch(); - _ISR_Enable( level ); - _Thread_Change_priority( - the_mutex->holder, - the_mutex->Attributes.priority_ceiling, - FALSE - ); - _Thread_Enable_dispatch(); - return 0; - } - /* if ( current < ceiling ) */ { - executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; - the_mutex->nest_count = 0; /* undo locking above */ - executing->resource_count--; /* undo locking above */ - _ISR_Enable( level ); - return 0; - } - } - return 0; - } - - if ( _Thread_Is_executing( the_mutex->holder ) ) { - switch ( the_mutex->Attributes.lock_nesting_behavior ) { - case CORE_MUTEX_NESTING_ACQUIRES: - the_mutex->nest_count++; - _ISR_Enable( level ); - return 0; - case CORE_MUTEX_NESTING_IS_ERROR: - executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; - _ISR_Enable( level ); - return 0; - case CORE_MUTEX_NESTING_BLOCKS: - break; - } - } - - return 1; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/coresem.inl b/c/src/exec/score/inline/rtems/score/coresem.inl deleted file mode 100644 index 2f5f8c7bff..0000000000 --- a/c/src/exec/score/inline/rtems/score/coresem.inl +++ /dev/null @@ -1,107 +0,0 @@ -/* inline/coresem.inl - * - * This include file contains all of the inlined routines associated - * with the CORE semaphore. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_CORE_SEMAPHORE_inl -#define __INLINE_CORE_SEMAPHORE_inl - -#include -#include - -/*PAGE - * - * _CORE_semaphore_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_semaphore_Is_priority( - CORE_semaphore_Attributes *the_attribute -) -{ - return ( the_attribute->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY ); -} - -/*PAGE - * - * _CORE_semaphore_Get_count - * - * DESCRIPTION: - * - * This routine returns the current count associated with the semaphore. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _CORE_semaphore_Get_count( - CORE_semaphore_Control *the_semaphore -) -{ - return the_semaphore->count; -} - -/*PAGE - * - * _CORE_semaphore_Seize_isr_disable - * - * DESCRIPTION: - * - * This routine attempts to receive a unit from the_semaphore. - * If a unit is available or if the wait flag is FALSE, then the routine - * returns. Otherwise, the calling task is blocked until a unit becomes - * available. - * - * NOTE: There is currently no MACRO version of this routine. - */ - -RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( - CORE_semaphore_Control *the_semaphore, - Objects_Id id, - boolean wait, - Watchdog_Interval timeout, - ISR_Level *level_p -) -{ - Thread_Control *executing; - ISR_Level level = *level_p; - - /* disabled when you get here */ - - executing = _Thread_Executing; - executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; - if ( the_semaphore->count != 0 ) { - the_semaphore->count -= 1; - _ISR_Enable( level ); - return; - } - - if ( !wait ) { - _ISR_Enable( level ); - executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; - return; - } - - _Thread_Disable_dispatch(); - _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); - executing->Wait.queue = &the_semaphore->Wait_queue; - executing->Wait.id = id; - _ISR_Enable( level ); - - _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); - _Thread_Enable_dispatch(); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/heap.inl b/c/src/exec/score/inline/rtems/score/heap.inl deleted file mode 100644 index 976ddfa0af..0000000000 --- a/c/src/exec/score/inline/rtems/score/heap.inl +++ /dev/null @@ -1,273 +0,0 @@ -/* heap.inl - * - * This file contains the static inline implementation of the inlined - * routines from the heap handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __HEAP_inl -#define __HEAP_inl - -#include - -/*PAGE - * - * _Heap_Head - * - * DESCRIPTION: - * - * This function returns the head of the specified heap. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Head ( - Heap_Control *the_heap -) -{ - return (Heap_Block *)&the_heap->start; -} - -/*PAGE - * - * _Heap_Tail - * - * DESCRIPTION: - * - * This function returns the tail of the specified heap. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Tail ( - Heap_Control *the_heap -) -{ - return (Heap_Block *)&the_heap->final; -} - -/*PAGE - * - * _Heap_Previous_block - * - * DESCRIPTION: - * - * This function returns the address of the block which physically - * precedes the_block in memory. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Previous_block ( - Heap_Block *the_block -) -{ - return (Heap_Block *) _Addresses_Subtract_offset( - (void *)the_block, - the_block->back_flag & ~ HEAP_BLOCK_USED - ); -} - -/*PAGE - * - * _Heap_Next_block - * - * DESCRIPTION: - * - * This function returns the address of the block which physically - * follows the_block in memory. - * - * NOTE: Next_block assumes that the block is free. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Next_block ( - Heap_Block *the_block -) -{ - return (Heap_Block *) _Addresses_Add_offset( - (void *)the_block, - the_block->front_flag & ~ HEAP_BLOCK_USED - ); -} - -/*PAGE - * - * _Heap_Block_at - * - * DESCRIPTION: - * - * This function calculates and returns a block's location (address) - * in the heap based upon a base address and an offset. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( - void *base, - unsigned32 offset -) -{ - return (Heap_Block *) _Addresses_Add_offset( (void *)base, offset ); -} - -/*PAGE - * - * _Heap_User_block_at - * - * DESCRIPTION: - * - * XXX - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_User_block_at( - void *base -) -{ - unsigned32 offset; - - offset = *(((unsigned32 *) base) - 1); - return _Heap_Block_at( base, -offset + -HEAP_BLOCK_USED_OVERHEAD); -} - -/*PAGE - * - * _Heap_Is_previous_block_free - * - * DESCRIPTION: - * - * This function returns TRUE if the previous block of the_block - * is free, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_previous_block_free ( - Heap_Block *the_block -) -{ - return !(the_block->back_flag & HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Is_block_free - * - * DESCRIPTION: - * - * This function returns TRUE if the block is free, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_free ( - Heap_Block *the_block -) -{ - return !(the_block->front_flag & HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Is_block_used - * - * DESCRIPTION: - * - * This function returns TRUE if the block is currently allocated, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_used ( - Heap_Block *the_block -) -{ - return (the_block->front_flag & HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Block_size - * - * DESCRIPTION: - * - * This function returns the size of the_block in bytes. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Heap_Block_size ( - Heap_Block *the_block -) -{ - return (the_block->front_flag & ~HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Start_of_user_area - * - * DESCRIPTION: - * - * This function returns the starting address of the portion of the block - * which the user may access. - */ - -RTEMS_INLINE_ROUTINE void *_Heap_Start_of_user_area ( - Heap_Block *the_block -) -{ - return (void *) &the_block->next; -} - -/*PAGE - * - * _Heap_Is_block_in - * - * DESCRIPTION: - * - * This function returns TRUE if the_block is within the memory area - * managed by the_heap, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_in ( - Heap_Control *the_heap, - Heap_Block *the_block -) -{ - return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_page_size_valid( - unsigned32 page_size -) -{ - return ((page_size != 0) && - ((page_size % CPU_HEAP_ALIGNMENT) == 0)); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Heap_Build_flag ( - unsigned32 size, - unsigned32 in_use_flag -) -{ - return size | in_use_flag; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/isr.inl b/c/src/exec/score/inline/rtems/score/isr.inl deleted file mode 100644 index 61ff05952a..0000000000 --- a/c/src/exec/score/inline/rtems/score/isr.inl +++ /dev/null @@ -1,55 +0,0 @@ -/* isr.inl - * - * This include file contains the static implementation of all - * inlined routines in the Interrupt Handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __ISR_inl -#define __ISR_inl - -/*PAGE - * - * _ISR_Is_vector_number_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the vector is a valid vector number - * for this processor and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _ISR_Is_vector_number_valid ( - unsigned32 vector -) -{ - return ( vector <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER ); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _ISR_Is_valid_user_handler ( - void *handler -) -{ - return ( handler != NULL); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/mppkt.inl b/c/src/exec/score/inline/rtems/score/mppkt.inl deleted file mode 100644 index 3838a96812..0000000000 --- a/c/src/exec/score/inline/rtems/score/mppkt.inl +++ /dev/null @@ -1,57 +0,0 @@ -/* inline/mppkt.inl - * - * This package is the implementation of the Packet Handler - * routines which are inlined. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_MP_PACKET_inl -#define __INLINE_MP_PACKET_inl - -/*PAGE - * - * _Mp_packet_Is_valid_packet_class - * - * DESCRIPTION: - * - * This function returns TRUE if the the_packet_class is valid, - * and FALSE otherwise. - * - * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary - * because this enum starts at lower bound of zero. - */ - -RTEMS_INLINE_ROUTINE boolean _Mp_packet_Is_valid_packet_class ( - MP_packet_Classes the_packet_class -) -{ - return ( the_packet_class <= MP_PACKET_CLASSES_LAST ); -} - -/*PAGE - * - * _Mp_packet_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the the_packet_class is null, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Mp_packet_Is_null ( - MP_packet_Prefix *the_packet -) -{ - return the_packet == NULL; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/object.inl b/c/src/exec/score/inline/rtems/score/object.inl deleted file mode 100644 index c09c09bc00..0000000000 --- a/c/src/exec/score/inline/rtems/score/object.inl +++ /dev/null @@ -1,315 +0,0 @@ -/* object.inl - * - * This include file contains the static inline implementation of all - * of the inlined routines in the Object Handler. - * - * COPYRIGHT (c) 1989-2002. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __OBJECTS_inl -#define __OBJECTS_inl - -/*PAGE - * - * _Objects_Build_id - * - * DESCRIPTION: - * - * This function builds an object's id from the processor node and index - * values specified. - */ - -RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id( - Objects_APIs the_api, - unsigned32 the_class, - unsigned32 node, - unsigned32 index -) -{ - return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | - (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | - (( (Objects_Id) node ) << OBJECTS_NODE_START_BIT) | - (( (Objects_Id) index ) << OBJECTS_INDEX_START_BIT); -} - -/*PAGE - * - * _Objects_Get_API - * - * DESCRIPTION: - * - * This function returns the API portion of the ID. - */ - -RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( - Objects_Id id -) -{ - return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); -} - -/*PAGE - * - * _Objects_Get_class - * - * DESCRIPTION: - * - * This function returns the class portion of the ID. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_class( - Objects_Id id -) -{ - return (unsigned32) - ((id >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS); -} - -/*PAGE - * - * _Objects_Get_node - * - * DESCRIPTION: - * - * This function returns the node portion of the ID. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_node( - Objects_Id id -) -{ - return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS; -} - -/*PAGE - * - * _Objects_Get_index - * - * DESCRIPTION: - * - * This function returns the index portion of the ID. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_index( - Objects_Id id -) -{ - return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; -} - -/*PAGE - * - * _Objects_Is_class_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the class is valid. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Is_class_valid( - unsigned32 the_class -) -{ - /* XXX how do we determine this now? */ - return TRUE; /* the_class && the_class <= OBJECTS_CLASSES_LAST; */ -} - -/*PAGE - * - * _Objects_Is_local_node - * - * DESCRIPTION: - * - * This function returns TRUE if the node is of the local object, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_node( - unsigned32 node -) -{ - return ( node == _Objects_Local_node ); -} - -/*PAGE - * - * _Objects_Is_local_id - * - * DESCRIPTION: - * - * This function returns TRUE if the id is of a local object, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_id( - Objects_Id id -) -{ - return _Objects_Is_local_node( _Objects_Get_node(id) ); -} - -/*PAGE - * - * _Objects_Are_ids_equal - * - * DESCRIPTION: - * - * This function returns TRUE if left and right are equal, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Are_ids_equal( - Objects_Id left, - Objects_Id right -) -{ - return ( left == right ); -} - -/*PAGE - * - * _Objects_Get_local_object - * - * DESCRIPTION: - * - * This function returns a pointer to the local_table object - * referenced by the index. - */ - -RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( - Objects_Information *information, - unsigned32 index -) -{ - if ( index > information->maximum ) - return NULL; - return information->local_table[ index ]; -} - -/*PAGE - * - * _Objects_Set_local_object - * - * DESCRIPTION: - * - * This function sets the pointer to the local_table object - * referenced by the index. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Set_local_object( - Objects_Information *information, - unsigned32 index, - Objects_Control *the_object -) -{ - if ( index <= information->maximum ) - information->local_table[ index ] = the_object; -} - - -/*PAGE - * - * _Objects_Get_information - * - * DESCRIPTION: - * - * This function return the information structure given - * an id of an object. - */ - -RTEMS_INLINE_ROUTINE Objects_Information *_Objects_Get_information( - Objects_Id id -) -{ - Objects_APIs the_api; - unsigned32 the_class; - - - the_class = _Objects_Get_class( id ); - - if ( !_Objects_Is_class_valid( the_class ) ) - return NULL; - - the_api = _Objects_Get_API( id ); - return _Objects_Information_table[ the_api ][ the_class ]; -} - -/*PAGE - * - * _Objects_Open - * - * DESCRIPTION: - * - * This function places the_object control pointer and object name - * in the Local Pointer and Local Name Tables, respectively. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Open( - Objects_Information *information, - Objects_Control *the_object, - Objects_Name name -) -{ - unsigned32 index; - - index = _Objects_Get_index( the_object->id ); - _Objects_Set_local_object( information, index, the_object ); - - if ( information->is_string ) - /* _Objects_Copy_name_string( name, the_object->name ); */ - the_object->name = name; - else - /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ - the_object->name = name; -} - -/*PAGE - * - * _Objects_Close - * - * DESCRIPTION: - * - * This function removes the_object control pointer and object name - * in the Local Pointer and Local Name Tables. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Close( - Objects_Information *information, - Objects_Control *the_object -) -{ - unsigned32 index; - - index = _Objects_Get_index( the_object->id ); - _Objects_Set_local_object( information, index, NULL ); - /* _Objects_Clear_name( the_object->name, information->name_length ); */ - the_object->name = 0; -} - -/*PAGE - * - * _Objects_Namespace_remove - * - * DESCRIPTION: - * - * This function removes the_object from the namespace. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Namespace_remove( - Objects_Information *information, - Objects_Control *the_object -) -{ - /* _Objects_Clear_name( the_object->name, information->name_length ); */ - the_object->name = 0; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/objectmp.inl b/c/src/exec/score/inline/rtems/score/objectmp.inl deleted file mode 100644 index 7e840c9ca3..0000000000 --- a/c/src/exec/score/inline/rtems/score/objectmp.inl +++ /dev/null @@ -1,72 +0,0 @@ -/* inline/objectmp.inl - * - * This include file contains the bodies of all inlined routines - * which deal with global objects. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_MP_OBJECTS_inl -#define __INLINE_MP_OBJECTS_inl - -/*PAGE - * - * _Objects_MP_Allocate_global_object - * - * DESCRIPTION: - * - * This function allocates a Global Object control block. - */ - -RTEMS_INLINE_ROUTINE Objects_MP_Control *_Objects_MP_Allocate_global_object ( - void -) -{ - return (Objects_MP_Control *) - _Chain_Get( &_Objects_MP_Inactive_global_objects ); -} - -/*PAGE - * - * _Objects_MP_Free_global_object - * - * DESCRIPTION: - * - * This routine deallocates a Global Object control block. - */ - -RTEMS_INLINE_ROUTINE void _Objects_MP_Free_global_object ( - Objects_MP_Control *the_object -) -{ - _Chain_Append( - &_Objects_MP_Inactive_global_objects, - &the_object->Object.Node - ); -} - -/*PAGE - * - * _Objects_MP_Is_null_global_object - * - * DESCRIPTION: - * - * This function returns whether the global object is NULL or not. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_MP_Is_null_global_object ( - Objects_MP_Control *the_object -) -{ - return( the_object == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/priority.inl b/c/src/exec/score/inline/rtems/score/priority.inl deleted file mode 100644 index 4928dba5ef..0000000000 --- a/c/src/exec/score/inline/rtems/score/priority.inl +++ /dev/null @@ -1,246 +0,0 @@ -/* priority.inl - * - * This file contains the static inline implementation of all inlined - * routines in the Priority Handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __PRIORITY_inl -#define __PRIORITY_inl - -#include - -/*PAGE - * - * _Priority_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) -{ - unsigned32 index; - - _Priority_Major_bit_map = 0; - for ( index=0 ; index <16 ; index++ ) - _Priority_Bit_map[ index ] = 0; -} - -/*PAGE - * - * _Priority_Is_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the_priority if valid for a - * user task, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Priority_Is_valid ( - Priority_Control the_priority -) -{ - /* - * Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned, - * then checking for less than 0 is unnecessary. - */ - - return ( the_priority <= PRIORITY_MAXIMUM ); -} - -/*PAGE - * - * _Priority_Major - * - * DESCRIPTION: - * - * This function returns the major portion of the_priority. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Major ( - Priority_Control the_priority -) -{ - return ( the_priority / 16 ); -} - -/*PAGE - * - * _Priority_Minor - * - * DESCRIPTION: - * - * This function returns the minor portion of the_priority. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Minor ( - Priority_Control the_priority -) -{ - return ( the_priority % 16 ); -} - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) - -/*PAGE - * - * _Priority_Mask - * - * DESCRIPTION: - * - * This function returns the mask associated with the major or minor - * number passed to it. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Mask ( - unsigned32 bit_number -) -{ - return (0x8000 >> bit_number); -} - - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Bits_index ( - unsigned32 bit_number -) -{ - return bit_number; -} - -#endif - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( - Priority_Information *the_priority_map -) -{ - *the_priority_map->minor |= the_priority_map->ready_minor; - _Priority_Major_bit_map |= the_priority_map->ready_major; -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( - Priority_Information *the_priority_map -) -{ - *the_priority_map->minor &= the_priority_map->block_minor; - if ( *the_priority_map->minor == 0 ) - _Priority_Major_bit_map &= the_priority_map->block_major; -} - -/*PAGE - * - * _Priority_Get_highest - * - * DESCRIPTION: - * - * This function returns the priority of the highest priority - * ready thread. - */ - -RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) -{ - Priority_Bit_map_control minor; - Priority_Bit_map_control major; - - _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); - _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); - - return (_Priority_Bits_index( major ) << 4) + - _Priority_Bits_index( minor ); -} - -/*PAGE - * - * _Priority_Initialize_information - * - * DESCRIPTION: - * - * This routine initializes the_priority_map so that it - * contains the information necessary to manage a thread - * at new_priority. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Initialize_information( - Priority_Information *the_priority_map, - Priority_Control new_priority -) -{ - Priority_Bit_map_control major; - Priority_Bit_map_control minor; - Priority_Bit_map_control mask; - - major = _Priority_Major( new_priority ); - minor = _Priority_Minor( new_priority ); - - the_priority_map->minor = - &_Priority_Bit_map[ _Priority_Bits_index(major) ]; - - mask = _Priority_Mask( major ); - the_priority_map->ready_major = mask; - the_priority_map->block_major = ~mask; - - mask = _Priority_Mask( minor ); - the_priority_map->ready_minor = mask; - the_priority_map->block_minor = ~mask; -} - -/*PAGE - * - * _Priority_Is_group_empty - * - * DESCRIPTION: - * - * This function returns TRUE if the priority GROUP is empty, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Priority_Is_group_empty ( - Priority_Control the_priority -) -{ - return the_priority == 0; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/stack.inl b/c/src/exec/score/inline/rtems/score/stack.inl deleted file mode 100644 index ea7f2f1c36..0000000000 --- a/c/src/exec/score/inline/rtems/score/stack.inl +++ /dev/null @@ -1,80 +0,0 @@ -/* stack.inl - * - * This file contains the static inline implementation of the inlined - * routines from the Stack Handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __STACK_inl -#define __STACK_inl - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Stack_Initialize ( - Stack_Control *the_stack, - void *starting_address, - unsigned32 size -) -{ - the_stack->area = starting_address; - the_stack->size = size; -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Stack_Is_enough ( - unsigned32 size -) -{ - return ( size >= STACK_MINIMUM_SIZE ); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Stack_Adjust_size ( - unsigned32 size -) -{ - return size + CPU_STACK_ALIGNMENT; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/states.inl b/c/src/exec/score/inline/rtems/score/states.inl deleted file mode 100644 index 5d57648f23..0000000000 --- a/c/src/exec/score/inline/rtems/score/states.inl +++ /dev/null @@ -1,383 +0,0 @@ -/* states.inl - * - * This file contains the macro implementation of the inlined - * routines associated with thread state information. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __STATES_inl -#define __STATES_inl - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE States_Control _States_Set ( - States_Control states_to_set, - States_Control current_state -) -{ - return (current_state | states_to_set); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE States_Control _States_Clear ( - States_Control states_to_clear, - States_Control current_state -) -{ - return (current_state & ~states_to_clear); -} - -/*PAGE - * - * _States_Is_ready - * - * DESCRIPTION: - * - * This function returns TRUE if the_states indicates that the - * state is READY, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_ready ( - States_Control the_states -) -{ - return (the_states == STATES_READY); -} - -/*PAGE - * - * _States_Is_only_dormant - * - * DESCRIPTION: - * - * This function returns TRUE if the DORMANT state is the ONLY state - * set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_only_dormant ( - States_Control the_states -) -{ - return (the_states == STATES_DORMANT); -} - -/*PAGE - * - * _States_Is_dormant - * - * DESCRIPTION: - * - * This function returns TRUE if the DORMANT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_dormant ( - States_Control the_states -) -{ - return (the_states & STATES_DORMANT); -} - -/*PAGE - * - * _States_Is_suspended - * - * DESCRIPTION: - * - * This function returns TRUE if the SUSPENDED state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_suspended ( - States_Control the_states -) -{ - return (the_states & STATES_SUSPENDED); -} - -/*PAGE - * - * _States_Is_Transient - * - * DESCRIPTION: - * - * This function returns TRUE if the TRANSIENT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_transient ( - States_Control the_states -) -{ - return (the_states & STATES_TRANSIENT); -} - -/*PAGE - * - * _States_Is_delaying - * - * DESCRIPTION: - * - * This function returns TRUE if the DELAYING state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_delaying ( - States_Control the_states -) -{ - return (the_states & STATES_DELAYING); -} - -/*PAGE - * - * _States_Is_waiting_for_buffer - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_BUFFER state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_buffer ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_BUFFER); -} - -/*PAGE - * - * _States_Is_waiting_for_segment - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_SEGMENT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_segment ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_SEGMENT); -} - -/*PAGE - * - * _States_Is_waiting_for_message - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_MESSAGE state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_message ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_MESSAGE); -} - -/*PAGE - * - * _States_Is_waiting_for_event - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_EVENT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_event ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_EVENT); -} - -/*PAGE - * - * _States_Is_waiting_for_mutex - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_MUTEX state - * is set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_mutex ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_MUTEX); -} - -/*PAGE - * - * _States_Is_waiting_for_semaphore - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_SEMAPHORE state - * is set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_semaphore ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_SEMAPHORE); -} - -/*PAGE - * - * _States_Is_waiting_for_time - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_TIME state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_time ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_TIME); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_rpc_reply ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_RPC_REPLY); -} - -/*PAGE - * - * _States_Is_waiting_for_period - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_PERIOD state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_period ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_PERIOD); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_locally_blocked ( - States_Control the_states -) -{ - return (the_states & STATES_LOCALLY_BLOCKED); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_on_thread_queue ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_ON_THREAD_QUEUE); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_blocked ( - States_Control the_states -) -{ - return (the_states & STATES_BLOCKED); -} - -/*PAGE - * - * - * _States_Are_set - * - * DESCRIPTION: - * - * This function returns TRUE if any of the states in the mask - * are set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Are_set ( - States_Control the_states, - States_Control mask -) -{ - return ( (the_states & mask) != STATES_READY); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/sysstate.inl b/c/src/exec/score/inline/rtems/score/sysstate.inl deleted file mode 100644 index 17976f3e3f..0000000000 --- a/c/src/exec/score/inline/rtems/score/sysstate.inl +++ /dev/null @@ -1,153 +0,0 @@ -/* sysstates.inl - * - * This file contains the inline implementation of routines regarding the - * system state. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __SYSTEM_STATE_inl -#define __SYSTEM_STATE_inl - -/*PAGE - * - * _System_state_Handler_initialization - * - * DESCRIPTION: - * - * This routine initializes the system state handler. - */ - -RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( - boolean is_multiprocessing -) -{ - _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; - _System_state_Is_multiprocessing = is_multiprocessing; -} - -/*PAGE - * - * _System_state_Set - * - * DESCRIPTION: - * - * This routine sets the current system state to that specified by - * the called. - */ - -RTEMS_INLINE_ROUTINE void _System_state_Set ( - System_state_Codes state -) -{ - _System_state_Current = state; -} - -/*PAGE - * - * _System_state_Get - * - * DESCRIPTION: - * - * This function returns the current system state. - */ - -RTEMS_INLINE_ROUTINE System_state_Codes _System_state_Get ( void ) -{ - return _System_state_Current; -} - -/*PAGE - * - * _System_state_Is_before_initialization - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "before initialization" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_initialization ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_BEFORE_INITIALIZATION); -} - -/*PAGE - * - * _System_state_Is_before_multitasking - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "before multitasking" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_multitasking ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_BEFORE_MULTITASKING); -} - -/*PAGE - * - * _System_state_Is_begin_multitasking - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "begin multitasking" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_begin_multitasking ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_BEGIN_MULTITASKING); -} - -/*PAGE - * - * _System_state_Is_up - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "up" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_up ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_UP); -} - -/*PAGE - * - * _System_state_Is_failed - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "failed" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_failed ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_FAILED); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/thread.inl b/c/src/exec/score/inline/rtems/score/thread.inl deleted file mode 100644 index 72d7a5dac5..0000000000 --- a/c/src/exec/score/inline/rtems/score/thread.inl +++ /dev/null @@ -1,427 +0,0 @@ -/* thread.inl - * - * This file contains the macro implementation of the inlined - * routines from the Thread handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __THREAD_inl -#define __THREAD_inl - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) -{ - _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); -} - -/*PAGE - * - * _Thread_Is_executing - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is the currently executing - * thread, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Executing ); -} - -/*PAGE - * - * _Thread_Is_heir - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is the heir - * thread, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_heir ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Heir ); -} - -/*PAGE - * - * _Thread_Is_executing_also_the_heir - * - * DESCRIPTION: - * - * This function returns TRUE if the currently executing thread - * is also the heir thread, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing_also_the_heir( void ) -{ - return ( _Thread_Executing == _Thread_Heir ); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Unblock ( - Thread_Control *the_thread -) -{ - _Thread_Clear_state( the_thread, STATES_BLOCKED ); -} - -/*PAGE - * - * _Thread_Restart_self - * - * DESCRIPTION: - * - * This routine resets the current context of the calling thread - * to that of its initial state. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) -{ -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) - if ( _Thread_Executing->fp_context != NULL ) - _Context_Restore_fp( &_Thread_Executing->fp_context ); -#endif - - _CPU_Context_Restart_self( &_Thread_Executing->Registers ); -} - -/*PAGE - * - * _Thread_Calculate_heir - * - * DESCRIPTION: - * - * This function returns a pointer to the highest priority - * ready thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) -{ - _Thread_Heir = (Thread_Control *) - _Thread_Ready_chain[ _Priority_Get_highest() ].first; -} - -/*PAGE - * - * _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. - */ - -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Allocated_fp ); -} -#endif - -/*PAGE - * - * _Thread_Deallocate_fp - * - * DESCRIPTION: - * - * This routine is invoked when the currently loaded floating - * point context is now longer associated with an active thread. - */ - -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) -{ - _Thread_Allocated_fp = NULL; -} -#endif - -/*PAGE - * - * _Thread_Disable_dispatch - * - * DESCRIPTION: - * - * This routine prevents dispatching. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) -{ - _Thread_Dispatch_disable_level += 1; -} - -/*PAGE - * - * _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 ) -RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() -{ - if ( (--_Thread_Dispatch_disable_level) == 0 ) - _Thread_Dispatch(); -} -#endif - -#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE ) -void _Thread_Enable_dispatch( void ); -#endif - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) -{ - _Thread_Dispatch_disable_level -= 1; -} - -/*PAGE - * - * _Thread_Is_dispatching_enabled - * - * DESCRIPTION: - * - * This function returns TRUE if dispatching is disabled, and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void ) -{ - return ( _Thread_Dispatch_disable_level == 0 ); -} - -/*PAGE - * - * _Thread_Is_context_switch_necessary - * - * DESCRIPTION: - * - * This function returns TRUE if dispatching is disabled, and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void ) -{ - return ( _Context_Switch_necessary ); -} - -/*PAGE - * - * _Thread_Dispatch_initialization - * - * DESCRIPTION: - * - * This routine initializes the thread dispatching subsystem. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) -{ - _Thread_Dispatch_disable_level = 1; -} - -/*PAGE - * - * _Thread_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_null ( - Thread_Control *the_thread -) -{ - return ( the_thread == NULL ); -} - -/*PAGE - * - * _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. - * - * NOTE: XXX... This routine may be able to be optimized. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - unsigned32 the_api; - unsigned32 the_class; - Objects_Information *information; - Thread_Control *tp = (Thread_Control *) 0; - - if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { - _Thread_Disable_dispatch(); - *location = OBJECTS_LOCAL; - tp = _Thread_Executing; - goto done; - } - - the_api = _Objects_Get_API( id ); - if ( the_api && the_api > OBJECTS_APIS_LAST ) { - *location = OBJECTS_ERROR; - goto done; - } - - the_class = _Objects_Get_class( id ); - if ( the_class != 1 ) { /* threads are always first class :) */ - *location = OBJECTS_ERROR; - goto done; - } - - information = _Objects_Information_table[ the_api ][ the_class ]; - - if ( !information ) { - *location = OBJECTS_ERROR; - goto done; - } - - tp = (Thread_Control *) _Objects_Get( information, id, location ); - -done: - return tp; -} - - -/* - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_proxy_blocking ( - unsigned32 code -) -{ - return (code == THREAD_STATUS_PROXY_BLOCKING); -} - -/*PAGE - * - * _Thread_Internal_allocate - * - * DESCRIPTION: - * - * This routine allocates an internal thread. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) -{ - return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); -} - -/*PAGE - * - * _Thread_Internal_free - * - * DESCRIPTION: - * - * This routine frees an internal thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Internal_free ( - Thread_Control *the_task -) -{ - _Objects_Free( &_Thread_Internal_information, &the_task->Object ); -} - -/*PAGE - * - * _Thread_Get_libc_reent - * - * DESCRIPTION: - * - * This routine returns the C library re-enterant pointer. - */ - -RTEMS_INLINE_ROUTINE void **_Thread_Get_libc_reent( void ) -{ - return _Thread_libc_reent; -} - -/*PAGE - * - * _Thread_Set_libc_reent - * - * DESCRIPTION: - * - * This routine set the C library re-enterant pointer. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( - void **libc_reent -) -{ - _Thread_libc_reent = libc_reent; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/threadmp.inl b/c/src/exec/score/inline/rtems/score/threadmp.inl deleted file mode 100644 index c095fd5072..0000000000 --- a/c/src/exec/score/inline/rtems/score/threadmp.inl +++ /dev/null @@ -1,60 +0,0 @@ -/* inline/threadmp.inl - * - * This include file contains the bodies of all inlined routines - * for the multiprocessing part of thread package. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __INLINE_MP_THREAD_inl -#define __INLINE_MP_THREAD_inl - -/*PAGE - * - * _Thread_MP_Is_receive - * - * DESCRIPTION: - * - * This function returns true if the thread in question is the - * multiprocessing receive thread. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_MP_Is_receive ( - Thread_Control *the_thread -) -{ - return the_thread == _Thread_MP_Receive; -} - -/*PAGE - * - * _Thread_MP_Free_proxy - * - * DESCRIPTION: - * - * This routine frees a proxy control block to the - * inactive chain of free proxy control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy ( - Thread_Control *the_thread -) -{ - Thread_Proxy_control *the_proxy; - - the_proxy = (Thread_Proxy_control *) the_thread; - - _Chain_Extract( &the_proxy->Active ); - - _Chain_Append( &_Thread_MP_Inactive_proxies, &the_thread->Object.Node ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/tod.inl b/c/src/exec/score/inline/rtems/score/tod.inl deleted file mode 100644 index 2d429a8005..0000000000 --- a/c/src/exec/score/inline/rtems/score/tod.inl +++ /dev/null @@ -1,66 +0,0 @@ -/* tod.inl - * - * This file contains the static inline implementation of the inlined routines - * from the Time of Day Handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __TIME_OF_DAY_inl -#define __TIME_OF_DAY_inl - -/*PAGE - * - * _TOD_Tickle_ticks - * - * DESCRIPTION: - * - * This routine increments the ticks field of the current time of - * day at each clock tick. - */ - -RTEMS_INLINE_ROUTINE void _TOD_Tickle_ticks( void ) -{ - _TOD_Current.ticks += 1; - _Watchdog_Ticks_since_boot += 1; -} - -/*PAGE - * - * _TOD_Deactivate - * - * DESCRIPTION: - * - * This routine deactivates updating of the current time of day. - */ - -RTEMS_INLINE_ROUTINE void _TOD_Deactivate( void ) -{ - _Watchdog_Remove( &_TOD_Seconds_watchdog ); -} - -/*PAGE - * - * _TOD_Activate - * - * DESCRIPTION: - * - * This routine activates updating of the current time of day. - */ - -RTEMS_INLINE_ROUTINE void _TOD_Activate( - Watchdog_Interval ticks -) -{ - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/tqdata.inl b/c/src/exec/score/inline/rtems/score/tqdata.inl deleted file mode 100644 index 201abeb82f..0000000000 --- a/c/src/exec/score/inline/rtems/score/tqdata.inl +++ /dev/null @@ -1,72 +0,0 @@ -/* tqdata.inl - * - * This file contains the static inline implementation of the inlined - * routines needed to support the Thread Queue Data. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __THREAD_QUEUE_DATA_inl -#define __THREAD_QUEUE_DATA_inl - -/*PAGE - * - * _Thread_queue_Header_number - * - * DESCRIPTION: - * - * This function returns the index of the priority chain on which - * a thread of the_priority should be placed. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Thread_queue_Header_number ( - Priority_Control the_priority -) -{ - return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_queue_Is_reverse_search ( - Priority_Control the_priority -) -{ - return ( the_priority & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK ); -} - -/*PAGE - * - * _Thread_queue_Enter_critical_section - * - * DESCRIPTION: - * - * This routine is invoked to indicate that the specified thread queue is - * entering a critical section. - */ - -RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( - Thread_queue_Control *the_thread_queue -) -{ - the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/userext.inl b/c/src/exec/score/inline/rtems/score/userext.inl deleted file mode 100644 index ef225bc8e0..0000000000 --- a/c/src/exec/score/inline/rtems/score/userext.inl +++ /dev/null @@ -1,169 +0,0 @@ -/* userext.inl - * - * This file contains the macro implementation of the inlined routines - * from the User Extension Handler - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __USER_EXTENSIONS_inl -#define __USER_EXTENSIONS_inl - -#include - -/*PAGE - * - * _User_extensions_Add_set - * - * DESCRIPTION: - * - * This routine is used to add a user extension set to the active list. - * - * NOTE: Must be before _User_extensions_Handler_initialization to - * ensure proper inlining. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Add_set ( - User_extensions_Control *the_extension, - User_extensions_Table *extension_table -) -{ - the_extension->Callouts = *extension_table; - - _Chain_Append( &_User_extensions_List, &the_extension->Node ); - - /* - * If a switch handler is present, append it to the switch chain. - */ - - if ( extension_table->thread_switch != NULL ) { - the_extension->Switch.thread_switch = extension_table->thread_switch; - _Chain_Append( &_User_extensions_Switches_list, &the_extension->Switch.Node ); - } -} - -/*PAGE - * - * _User_extensions_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization ( - unsigned32 number_of_extensions, - User_extensions_Table *initial_extensions -) -{ - User_extensions_Control *extension; - unsigned32 i; - - _Chain_Initialize_empty( &_User_extensions_List ); - _Chain_Initialize_empty( &_User_extensions_Switches_list ); - - if ( initial_extensions ) { - extension = - _Workspace_Allocate_or_fatal_error( - number_of_extensions * sizeof( User_extensions_Control ) - ); - - memset ( - extension, - 0, - number_of_extensions * sizeof( User_extensions_Control ) - ); - - for ( i = 0 ; i < number_of_extensions ; i++ ) { - _User_extensions_Add_set (extension, &initial_extensions[i]); - extension++; - } - } -} - -/*PAGE - * - * _User_extensions_Add_API_set - * - * DESCRIPTION: - * - * This routine is used to add an API extension set to the active list. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set ( - User_extensions_Control *the_extension -) -{ - _Chain_Append( &_User_extensions_List, &the_extension->Node ); - - /* - * If a switch handler is present, append it to the switch chain. - */ - - if ( the_extension->Callouts.thread_switch != NULL ) { - the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; - _Chain_Append( - &_User_extensions_Switches_list, &the_extension->Switch.Node ); - } -} - -/*PAGE - * - * _User_extensions_Remove_set - * - * DESCRIPTION: - * - * This routine is used to remove a user extension set from the active list. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Remove_set ( - User_extensions_Control *the_extension -) -{ - _Chain_Extract( &the_extension->Node ); - - /* - * If a switch handler is present, remove it. - */ - - if ( the_extension->Callouts.thread_switch != NULL ) - _Chain_Extract( &the_extension->Switch.Node ); -} - -/*PAGE - * - * _User_extensions_Thread_switch - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension which - * is invoked when a context switch occurs. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Thread_switch ( - Thread_Control *executing, - Thread_Control *heir -) -{ - Chain_Node *the_node; - User_extensions_Switch_control *the_extension_switch; - - for ( the_node = _User_extensions_Switches_list.first ; - !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; - the_node = the_node->next ) { - - the_extension_switch = (User_extensions_Switch_control *) the_node; - - (*the_extension_switch->thread_switch)( executing, heir ); - } -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/watchdog.inl b/c/src/exec/score/inline/rtems/score/watchdog.inl deleted file mode 100644 index 5b87c00f17..0000000000 --- a/c/src/exec/score/inline/rtems/score/watchdog.inl +++ /dev/null @@ -1,323 +0,0 @@ -/* watchdog.inl - * - * This file contains the static inline implementation of all inlined - * routines in the Watchdog Handler. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __WATCHDOG_inl -#define __WATCHDOG_inl - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Initialize( - Watchdog_Control *the_watchdog, - Watchdog_Service_routine_entry routine, - Objects_Id id, - void *user_data -) -{ - the_watchdog->state = WATCHDOG_INACTIVE; - the_watchdog->routine = routine; - the_watchdog->id = id; - the_watchdog->user_data = user_data; -} - -/*PAGE - * - * _Watchdog_Is_active - * - * DESCRIPTION: - * - * This routine returns TRUE if the watchdog timer is in the ACTIVE - * state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Watchdog_Is_active( - Watchdog_Control *the_watchdog -) -{ - - return ( the_watchdog->state == WATCHDOG_ACTIVE ); - -} - -/*PAGE - * - * _Watchdog_Activate - * - * DESCRIPTION: - * - * This routine activates THE_WATCHDOG timer which is already - * on a watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Activate( - Watchdog_Control *the_watchdog -) -{ - - the_watchdog->state = WATCHDOG_ACTIVE; - -} - -/*PAGE - * - * _Watchdog_Deactivate - * - * DESCRIPTION: - * - * This routine deactivates THE_WATCHDOG timer which will remain - * on a watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( - Watchdog_Control *the_watchdog -) -{ - - the_watchdog->state = WATCHDOG_REMOVE_IT; - -} - -/*PAGE - * - * _Watchdog_Tickle_ticks - * - * DESCRIPTION: - * - * This routine is invoked at each clock tick to update the ticks - * watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) -{ - - _Watchdog_Tickle( &_Watchdog_Ticks_chain ); - -} - -/*PAGE - * - * _Watchdog_Tickle_seconds - * - * DESCRIPTION: - * - * This routine is invoked at each clock tick to update the seconds - * watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) -{ - - _Watchdog_Tickle( &_Watchdog_Seconds_chain ); - -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Insert_ticks( - Watchdog_Control *the_watchdog, - Watchdog_Interval units -) -{ - - the_watchdog->initial = units; - - _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); - -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds( - Watchdog_Control *the_watchdog, - Watchdog_Interval units -) -{ - - the_watchdog->initial = units; - - _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); - -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_seconds( - Watchdog_Adjust_directions direction, - Watchdog_Interval units -) -{ - - _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); - -} - -/*PAGE - * - * _Watchdog_Adjust_ticks - * - * DESCRIPTION: - * - * This routine adjusts the ticks watchdog chain in the forward - * or backward DIRECTION for UNITS ticks. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_ticks( - Watchdog_Adjust_directions direction, - Watchdog_Interval units -) -{ - - _Watchdog_Adjust( &_Watchdog_Ticks_chain, direction, units ); - -} - -/*PAGE - * - * _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. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Reset( - Watchdog_Control *the_watchdog -) -{ - - (void) _Watchdog_Remove( the_watchdog ); - - _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); - -} - -/*PAGE - * - * _Watchdog_Next - * - * DESCRIPTION: - * - * This routine returns a pointer to the watchdog timer following - * THE_WATCHDOG on the watchdog chain. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( - Watchdog_Control *the_watchdog -) -{ - - return ( (Watchdog_Control *) the_watchdog->Node.next ); - -} - -/*PAGE - * - * _Watchdog_Previous - * - * DESCRIPTION: - * - * This routine returns a pointer to the watchdog timer preceding - * THE_WATCHDOG on the watchdog chain. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Previous( - Watchdog_Control *the_watchdog -) -{ - - return ( (Watchdog_Control *) the_watchdog->Node.previous ); - -} - -/*PAGE - * - * _Watchdog_First - * - * DESCRIPTION: - * - * This routine returns a pointer to the first watchdog timer - * on the watchdog chain HEADER. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( - Chain_Control *header -) -{ - - return ( (Watchdog_Control *) header->first ); - -} - -/*PAGE - * - * _Watchdog_Last - * - * DESCRIPTION: - * - * This routine returns a pointer to the last watchdog timer - * on the watchdog chain HEADER. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last( - Chain_Control *header -) -{ - - return ( (Watchdog_Control *) header->last ); - -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/wkspace.inl b/c/src/exec/score/inline/rtems/score/wkspace.inl deleted file mode 100644 index 2a31514c32..0000000000 --- a/c/src/exec/score/inline/rtems/score/wkspace.inl +++ /dev/null @@ -1,56 +0,0 @@ -/* wkspace.inl - * - * This include file contains the bodies of the routines which contains - * information related to the RAM Workspace. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __WORKSPACE_inl -#define __WORKSPACE_inl - -/*PAGE - * - * _Workspace_Allocate - * - * DESCRIPTION: - * - * This routine returns the address of a block of memory of size - * bytes. If a block of the appropriate size cannot be allocated - * from the workspace, then NULL is returned. - */ - -RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( - unsigned32 size -) -{ - return _Heap_Allocate( &_Workspace_Area, size ); -} - -/*PAGE - * - * _Workspace_Free - * - * DESCRIPTION: - * - * This function frees the specified block of memory. If the block - * belongs to the Workspace and can be successfully freed, then - * TRUE is returned. Otherwise FALSE is returned. - */ - -RTEMS_INLINE_ROUTINE boolean _Workspace_Free( - void *block -) -{ - return _Heap_Free( &_Workspace_Area, block ); -} - -#endif -/* end of include file */ -- cgit v1.2.3