From 0fc85c5081970b93a0626a1ef4ac62db91110418 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 18 Feb 1999 17:26:10 +0000 Subject: Should have been removed earlier. --- c/src/exec/score/inline/Makefile.in | 36 --- c/src/exec/score/inline/address.inl | 120 ---------- c/src/exec/score/inline/chain.inl | 390 -------------------------------- c/src/exec/score/inline/coremsg.inl | 260 ---------------------- c/src/exec/score/inline/coremutex.inl | 124 ----------- c/src/exec/score/inline/coresem.inl | 54 ----- c/src/exec/score/inline/heap.inl | 274 ----------------------- c/src/exec/score/inline/isr.inl | 73 ------ c/src/exec/score/inline/mppkt.inl | 58 ----- c/src/exec/score/inline/object.inl | 244 -------------------- c/src/exec/score/inline/objectmp.inl | 73 ------ c/src/exec/score/inline/priority.inl | 247 --------------------- c/src/exec/score/inline/stack.inl | 81 ------- c/src/exec/score/inline/states.inl | 384 -------------------------------- c/src/exec/score/inline/sysstate.inl | 154 ------------- c/src/exec/score/inline/thread.inl | 404 ---------------------------------- c/src/exec/score/inline/threadmp.inl | 61 ----- c/src/exec/score/inline/tod.inl | 67 ------ c/src/exec/score/inline/tqdata.inl | 73 ------ c/src/exec/score/inline/userext.inl | 132 ----------- c/src/exec/score/inline/watchdog.inl | 324 --------------------------- c/src/exec/score/inline/wkspace.inl | 57 ----- 22 files changed, 3690 deletions(-) delete mode 100644 c/src/exec/score/inline/Makefile.in delete mode 100644 c/src/exec/score/inline/address.inl delete mode 100644 c/src/exec/score/inline/chain.inl delete mode 100644 c/src/exec/score/inline/coremsg.inl delete mode 100644 c/src/exec/score/inline/coremutex.inl delete mode 100644 c/src/exec/score/inline/coresem.inl delete mode 100644 c/src/exec/score/inline/heap.inl delete mode 100644 c/src/exec/score/inline/isr.inl delete mode 100644 c/src/exec/score/inline/mppkt.inl delete mode 100644 c/src/exec/score/inline/object.inl delete mode 100644 c/src/exec/score/inline/objectmp.inl delete mode 100644 c/src/exec/score/inline/priority.inl delete mode 100644 c/src/exec/score/inline/stack.inl delete mode 100644 c/src/exec/score/inline/states.inl delete mode 100644 c/src/exec/score/inline/sysstate.inl delete mode 100644 c/src/exec/score/inline/thread.inl delete mode 100644 c/src/exec/score/inline/threadmp.inl delete mode 100644 c/src/exec/score/inline/tod.inl delete mode 100644 c/src/exec/score/inline/tqdata.inl delete mode 100644 c/src/exec/score/inline/userext.inl delete mode 100644 c/src/exec/score/inline/watchdog.inl delete mode 100644 c/src/exec/score/inline/wkspace.inl (limited to 'c/src/exec/score/inline') diff --git a/c/src/exec/score/inline/Makefile.in b/c/src/exec/score/inline/Makefile.in deleted file mode 100644 index 228ef54748..0000000000 --- a/c/src/exec/score/inline/Makefile.in +++ /dev/null @@ -1,36 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -VPATH = @srcdir@ -RTEMS_ROOT = @top_srcdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -# We only build multiprocessing related files if HAS_MP was defined -MP_PIECES_yes_V = mppkt objectmp threadmp -MP_PIECES = $(MP_PIECES_$(HAS_MP)_V) - -I_PIECES= address chain coremsg coremutex coresem heap \ - isr object priority stack states sysstate thread \ - tod tqdata userext watchdog wkspace $(MP_PIECES) -I_FILES=$(I_PIECES:%=$(srcdir)/%.inl) - -SRCS=$(I_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/lib.cfg - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += $(LIB) -CLOBBER_ADDITIONS += - -all: $(SRCS) - $(INSTALL) -m 444 ${I_FILES} $(PROJECT_INCLUDE)/rtems/score diff --git a/c/src/exec/score/inline/address.inl b/c/src/exec/score/inline/address.inl deleted file mode 100644 index 2e3049d08e..0000000000 --- a/c/src/exec/score/inline/address.inl +++ /dev/null @@ -1,120 +0,0 @@ -/* inline/address.inl - * - * This include file contains the bodies of the routines - * about addresses which are inlined. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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 -) -{ - return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 ); -} - -/*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/chain.inl b/c/src/exec/score/inline/chain.inl deleted file mode 100644 index 4bd80116ae..0000000000 --- a/c/src/exec/score/inline/chain.inl +++ /dev/null @@ -1,390 +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-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/coremsg.inl b/c/src/exec/score/inline/coremsg.inl deleted file mode 100644 index a43b0e7b06..0000000000 --- a/c/src/exec/score/inline/coremsg.inl +++ /dev/null @@ -1,260 +0,0 @@ -/* coremsg.inl - * - * This include file contains the static inline implementation of all - * inlined routines in the Core Message Handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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 -) -{ - return _CORE_message_queue_Submit( - the_message_queue, - buffer, - size, - id, - api_message_queue_mp_support, - CORE_MESSAGE_QUEUE_SEND_REQUEST - ); -} - -/*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 -) -{ - return _CORE_message_queue_Submit( - the_message_queue, - buffer, - size, - id, - api_message_queue_mp_support, - CORE_MESSAGE_QUEUE_URGENT_REQUEST - ); -} - -/*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/coremutex.inl b/c/src/exec/score/inline/coremutex.inl deleted file mode 100644 index 457f7c7d7d..0000000000 --- a/c/src/exec/score/inline/coremutex.inl +++ /dev/null @@ -1,124 +0,0 @@ -/* inline/coremutex.inl - * - * This include file contains all of the inlined routines associated - * with the CORE mutexes. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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_Is_nesting_allowed - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex allows a task to obtain a - * semaphore more than once and nest. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_nesting_allowed( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->allow_nesting == TRUE; - -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/coresem.inl b/c/src/exec/score/inline/coresem.inl deleted file mode 100644 index 7ef8c93990..0000000000 --- a/c/src/exec/score/inline/coresem.inl +++ /dev/null @@ -1,54 +0,0 @@ -/* inline/coresem.inl - * - * This include file contains all of the inlined routines associated - * with the CORE semaphore. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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 - -/*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; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/heap.inl b/c/src/exec/score/inline/heap.inl deleted file mode 100644 index 92936f8135..0000000000 --- a/c/src/exec/score/inline/heap.inl +++ /dev/null @@ -1,274 +0,0 @@ -/* heap.inl - * - * This file contains the static inline implementation of the inlined - * routines from the heap handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/isr.inl b/c/src/exec/score/inline/isr.inl deleted file mode 100644 index 6bd6e09d16..0000000000 --- a/c/src/exec/score/inline/isr.inl +++ /dev/null @@ -1,73 +0,0 @@ -/* isr.inl - * - * This include file contains the static implementation of all - * inlined routines in the Interrupt Handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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_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. - */ - -RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void ) -{ - return (_ISR_Nest_level != 0); -} - -/*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/mppkt.inl b/c/src/exec/score/inline/mppkt.inl deleted file mode 100644 index 4be286b294..0000000000 --- a/c/src/exec/score/inline/mppkt.inl +++ /dev/null @@ -1,58 +0,0 @@ -/* inline/mppkt.inl - * - * This package is the implementation of the Packet Handler - * routines which are inlined. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/object.inl b/c/src/exec/score/inline/object.inl deleted file mode 100644 index 7e4d12aeec..0000000000 --- a/c/src/exec/score/inline/object.inl +++ /dev/null @@ -1,244 +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-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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_Classes the_class, - unsigned32 node, - unsigned32 index -) -{ - return ( (the_class << OBJECTS_CLASS_START_BIT) | - (node << OBJECTS_NODE_START_BIT) | - (index << OBJECTS_INDEX_START_BIT) ); -} - -/*PAGE - * - * _Objects_Get_class - * - * DESCRIPTION: - * - * This function returns the class portion of the ID. - */ - -RTEMS_INLINE_ROUTINE Objects_Classes _Objects_Get_class( - Objects_Id id -) -{ - return (Objects_Classes) - ((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( - Objects_Classes the_class -) -{ - return 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_Allocate - * - * DESCRIPTION: - * - * This function allocates a object control block from - * the inactive chain of free object control blocks. - */ - -RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Allocate( - Objects_Information *information -) -{ - return (Objects_Control *) _Chain_Get( &information->Inactive ); -} - -/*PAGE - * - * _Objects_Free - * - * DESCRIPTION: - * - * This function frees a object control block to the - * inactive chain of free object control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Free( - Objects_Information *information, - Objects_Control *the_object -) -{ - _Chain_Append( &information->Inactive, &the_object->Node ); -} - -/*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 ); - information->local_table[ index ] = the_object; - - if ( information->is_string ) - _Objects_Copy_name_string( name, the_object->name ); - else - _Objects_Copy_name_raw( name, the_object->name, information->name_length ); -} - -/*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 ); - information->local_table[ index ] = (Objects_Control *) NULL; - _Objects_Clear_name( the_object->name, information->name_length ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/objectmp.inl b/c/src/exec/score/inline/objectmp.inl deleted file mode 100644 index f8fc62e129..0000000000 --- a/c/src/exec/score/inline/objectmp.inl +++ /dev/null @@ -1,73 +0,0 @@ -/* inline/objectmp.inl - * - * This include file contains the bodies of all inlined routines - * which deal with global objects. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/priority.inl b/c/src/exec/score/inline/priority.inl deleted file mode 100644 index b19d157976..0000000000 --- a/c/src/exec/score/inline/priority.inl +++ /dev/null @@ -1,247 +0,0 @@ -/* priority.inl - * - * This file contains the static inline implementation of all inlined - * routines in the Priority Handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/stack.inl b/c/src/exec/score/inline/stack.inl deleted file mode 100644 index eedd2f5ba2..0000000000 --- a/c/src/exec/score/inline/stack.inl +++ /dev/null @@ -1,81 +0,0 @@ -/* stack.inl - * - * This file contains the static inline implementation of the inlined - * routines from the Stack Handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/states.inl b/c/src/exec/score/inline/states.inl deleted file mode 100644 index 1e67b14144..0000000000 --- a/c/src/exec/score/inline/states.inl +++ /dev/null @@ -1,384 +0,0 @@ -/* states.inl - * - * This file contains the macro implementation of the inlined - * routines associated with thread state information. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/sysstate.inl b/c/src/exec/score/inline/sysstate.inl deleted file mode 100644 index dea36d2806..0000000000 --- a/c/src/exec/score/inline/sysstate.inl +++ /dev/null @@ -1,154 +0,0 @@ -/* sysstates.inl - * - * This file contains the inline implementation of routines regarding the - * system state. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/thread.inl b/c/src/exec/score/inline/thread.inl deleted file mode 100644 index eef4532c07..0000000000 --- a/c/src/exec/score/inline/thread.inl +++ /dev/null @@ -1,404 +0,0 @@ -/* thread.inl - * - * This file contains the macro implementation of the inlined - * routines from the Thread handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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_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. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Resume ( - Thread_Control *the_thread -) -{ - _Thread_Clear_state( the_thread, STATES_SUSPENDED ); -} - -/*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 ( _Thread_Executing->fp_context != NULL ) - _Context_Restore_fp( &_Thread_Executing->fp_context ); - - _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. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Allocated_fp ); -} - -/*PAGE - * - * _Thread_Deallocate_fp - * - * DESCRIPTION: - * - * This routine is invoked when the currently loaded floating - * point context is now longer associated with an active thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) -{ - _Thread_Allocated_fp = NULL; -} - -/*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 -) -{ - Objects_Classes 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_class = _Objects_Get_class( id ); - - if ( the_class > OBJECTS_CLASSES_LAST ) { - *location = OBJECTS_ERROR; - goto done; - } - - information = _Objects_Information_table[ the_class ]; - - if ( !information || !information->is_thread ) { - *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 ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/threadmp.inl b/c/src/exec/score/inline/threadmp.inl deleted file mode 100644 index 7a0391ff73..0000000000 --- a/c/src/exec/score/inline/threadmp.inl +++ /dev/null @@ -1,61 +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-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/tod.inl b/c/src/exec/score/inline/tod.inl deleted file mode 100644 index 326d662e64..0000000000 --- a/c/src/exec/score/inline/tod.inl +++ /dev/null @@ -1,67 +0,0 @@ -/* tod.inl - * - * This file contains the static inline implementation of the inlined routines - * from the Time of Day Handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/tqdata.inl b/c/src/exec/score/inline/tqdata.inl deleted file mode 100644 index d589933cf8..0000000000 --- a/c/src/exec/score/inline/tqdata.inl +++ /dev/null @@ -1,73 +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-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/userext.inl b/c/src/exec/score/inline/userext.inl deleted file mode 100644 index 29f7975aaa..0000000000 --- a/c/src/exec/score/inline/userext.inl +++ /dev/null @@ -1,132 +0,0 @@ -/* userext.inl - * - * This file contains the macro implementation of the inlined routines - * from the User Extension Handler - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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_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 ); - - if ( initial_extensions ) { - for (i=0 ; iCallouts = initial_extensions[i]; - _Chain_Append( &_User_extensions_List, &extension->Node ); - } - } -} - -/*PAGE - * - * _User_extensions_Add_set - * - * DESCRIPTION: - * - * This routine is used to add a user extension set to the active list. - */ - -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 ); -} - -/*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_Prepend( &_User_extensions_List, &the_extension->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 ); -} - -/*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_Control *the_extension; - - for ( the_node = _User_extensions_List.first ; - !_Chain_Is_tail( &_User_extensions_List, the_node ) ; - the_node = the_node->next ) { - - the_extension = (User_extensions_Control *) the_node; - - if ( the_extension->Callouts.thread_switch != NULL ) - (*the_extension->Callouts.thread_switch)( executing, heir ); - } -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/watchdog.inl b/c/src/exec/score/inline/watchdog.inl deleted file mode 100644 index 9662a9abc6..0000000000 --- a/c/src/exec/score/inline/watchdog.inl +++ /dev/null @@ -1,324 +0,0 @@ -/* watchdog.inl - * - * This file contains the static inline implementation of all inlined - * routines in the Watchdog Handler. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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/wkspace.inl b/c/src/exec/score/inline/wkspace.inl deleted file mode 100644 index f92bde0f41..0000000000 --- a/c/src/exec/score/inline/wkspace.inl +++ /dev/null @@ -1,57 +0,0 @@ -/* wkspace.inl - * - * This include file contains the bodies of the routines which contains - * information related to the RAM Workspace. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * 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