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/macros/.cvsignore | 2 - c/src/exec/score/macros/Makefile.am | 43 ---- c/src/exec/score/macros/README | 18 -- c/src/exec/score/macros/rtems/.cvsignore | 2 - c/src/exec/score/macros/rtems/score/.cvsignore | 2 - c/src/exec/score/macros/rtems/score/README | 18 -- c/src/exec/score/macros/rtems/score/address.inl | 75 ------- c/src/exec/score/macros/rtems/score/chain.inl | 199 ------------------ c/src/exec/score/macros/rtems/score/coremsg.inl | 144 ------------- c/src/exec/score/macros/rtems/score/coremutex.inl | 81 -------- c/src/exec/score/macros/rtems/score/coresem.inl | 71 ------- c/src/exec/score/macros/rtems/score/heap.inl | 149 -------------- c/src/exec/score/macros/rtems/score/isr.inl | 38 ---- c/src/exec/score/macros/rtems/score/mppkt.inl | 40 ---- c/src/exec/score/macros/rtems/score/object.inl | 188 ----------------- c/src/exec/score/macros/rtems/score/objectmp.inl | 49 ----- c/src/exec/score/macros/rtems/score/priority.inl | 169 ---------------- c/src/exec/score/macros/rtems/score/stack.inl | 49 ----- c/src/exec/score/macros/rtems/score/states.inl | 209 ------------------- c/src/exec/score/macros/rtems/score/sysstate.inl | 89 -------- c/src/exec/score/macros/rtems/score/thread.inl | 234 ---------------------- c/src/exec/score/macros/rtems/score/threadmp.inl | 49 ----- c/src/exec/score/macros/rtems/score/tod.inl | 48 ----- c/src/exec/score/macros/rtems/score/tqdata.inl | 49 ----- c/src/exec/score/macros/rtems/score/userext.inl | 132 ------------ c/src/exec/score/macros/rtems/score/watchdog.inl | 171 ---------------- c/src/exec/score/macros/rtems/score/wkspace.inl | 38 ---- 27 files changed, 2356 deletions(-) delete mode 100644 c/src/exec/score/macros/.cvsignore delete mode 100644 c/src/exec/score/macros/Makefile.am delete mode 100644 c/src/exec/score/macros/README delete mode 100644 c/src/exec/score/macros/rtems/.cvsignore delete mode 100644 c/src/exec/score/macros/rtems/score/.cvsignore delete mode 100644 c/src/exec/score/macros/rtems/score/README delete mode 100644 c/src/exec/score/macros/rtems/score/address.inl delete mode 100644 c/src/exec/score/macros/rtems/score/chain.inl delete mode 100644 c/src/exec/score/macros/rtems/score/coremsg.inl delete mode 100644 c/src/exec/score/macros/rtems/score/coremutex.inl delete mode 100644 c/src/exec/score/macros/rtems/score/coresem.inl delete mode 100644 c/src/exec/score/macros/rtems/score/heap.inl delete mode 100644 c/src/exec/score/macros/rtems/score/isr.inl delete mode 100644 c/src/exec/score/macros/rtems/score/mppkt.inl delete mode 100644 c/src/exec/score/macros/rtems/score/object.inl delete mode 100644 c/src/exec/score/macros/rtems/score/objectmp.inl delete mode 100644 c/src/exec/score/macros/rtems/score/priority.inl delete mode 100644 c/src/exec/score/macros/rtems/score/stack.inl delete mode 100644 c/src/exec/score/macros/rtems/score/states.inl delete mode 100644 c/src/exec/score/macros/rtems/score/sysstate.inl delete mode 100644 c/src/exec/score/macros/rtems/score/thread.inl delete mode 100644 c/src/exec/score/macros/rtems/score/threadmp.inl delete mode 100644 c/src/exec/score/macros/rtems/score/tod.inl delete mode 100644 c/src/exec/score/macros/rtems/score/tqdata.inl delete mode 100644 c/src/exec/score/macros/rtems/score/userext.inl delete mode 100644 c/src/exec/score/macros/rtems/score/watchdog.inl delete mode 100644 c/src/exec/score/macros/rtems/score/wkspace.inl (limited to 'c/src/exec/score/macros') diff --git a/c/src/exec/score/macros/.cvsignore b/c/src/exec/score/macros/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/exec/score/macros/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/exec/score/macros/Makefile.am b/c/src/exec/score/macros/Makefile.am deleted file mode 100644 index 2cefac6a56..0000000000 --- a/c/src/exec/score/macros/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 MACROS -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) README - -include $(top_srcdir)/automake/local.am diff --git a/c/src/exec/score/macros/README b/c/src/exec/score/macros/README deleted file mode 100644 index b2f0c4d481..0000000000 --- a/c/src/exec/score/macros/README +++ /dev/null @@ -1,18 +0,0 @@ -# -# $Id$ -# - -The files in this directory are not considered the "primary" source -of inlined routines for RTEMS. The "inline" directory contains -the implementations of the inlined basis which are regularly -tested. In general, an effort is made to keep the contents of -this directory up to date but testing is only performed irregularly -and even then it is usually with a single target processor and BSP. - -The primary purpose of the code in this directory is to insure -that RTEMS can be compiled using a C compiler which does not support -static inline routines. - -These were last successfully tested on 2/1/95 on a prerelease version -of 3.2.0. The testing was done only on the Force CPU386 i386 target board. -No testing was done on version of the code in the final release. diff --git a/c/src/exec/score/macros/rtems/.cvsignore b/c/src/exec/score/macros/rtems/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/exec/score/macros/rtems/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/exec/score/macros/rtems/score/.cvsignore b/c/src/exec/score/macros/rtems/score/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/exec/score/macros/rtems/score/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/exec/score/macros/rtems/score/README b/c/src/exec/score/macros/rtems/score/README deleted file mode 100644 index b2f0c4d481..0000000000 --- a/c/src/exec/score/macros/rtems/score/README +++ /dev/null @@ -1,18 +0,0 @@ -# -# $Id$ -# - -The files in this directory are not considered the "primary" source -of inlined routines for RTEMS. The "inline" directory contains -the implementations of the inlined basis which are regularly -tested. In general, an effort is made to keep the contents of -this directory up to date but testing is only performed irregularly -and even then it is usually with a single target processor and BSP. - -The primary purpose of the code in this directory is to insure -that RTEMS can be compiled using a C compiler which does not support -static inline routines. - -These were last successfully tested on 2/1/95 on a prerelease version -of 3.2.0. The testing was done only on the Force CPU386 i386 target board. -No testing was done on version of the code in the final release. diff --git a/c/src/exec/score/macros/rtems/score/address.inl b/c/src/exec/score/macros/rtems/score/address.inl deleted file mode 100644 index 24f9dc12e5..0000000000 --- a/c/src/exec/score/macros/rtems/score/address.inl +++ /dev/null @@ -1,75 +0,0 @@ -/* macros/address.h - * - * 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 __MACROS_ADDRESSES_h -#define __MACROS_ADDRESSES_h - -/*PAGE - * - * _Addresses_Add_offset - * - */ - -#define _Addresses_Add_offset( _base, _offset ) \ - ((void *)((char *)(_base) + (_offset))) - -/*PAGE - * - * _Addresses_Subtract_offset - * - */ - -#define _Addresses_Subtract_offset( _base, _offset ) \ - ((void *)((char *)(_base) - (_offset))) - -/*PAGE - * - * _Addresses_Subtract - * - * NOTE: The cast of an address to an unsigned32 makes this code - * dependent on an addresses being thirty two bits. - */ - -#define _Addresses_Subtract( _left, _right ) \ - ((void *)(_left) - (void *)(_right)) - -/*PAGE - * - * _Addresses_Is_aligned - * - */ - -#if (CPU_ALIGNMENT == 0) -#define _Addresses_Is_aligned( _address ) \ - (TRUE) -#elif defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES) -#define _Addresses_Is_aligned( _address ) \ - ( ( (unsigned short)(_address) % CPU_ALIGNMENT ) == 0 ) -#else -#define _Addresses_Is_aligned( _address ) \ - ( ( (unsigned32)(_address) % CPU_ALIGNMENT ) == 0 ) -#endif - -/*PAGE - * - * _Addresses_Is_in_range - * - */ - -#define _Addresses_Is_in_range( _address, _base, _limit ) \ - ( (_address) >= (_base) && (_address) <= (_limit) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/chain.inl b/c/src/exec/score/macros/rtems/score/chain.inl deleted file mode 100644 index 0c9f998117..0000000000 --- a/c/src/exec/score/macros/rtems/score/chain.inl +++ /dev/null @@ -1,199 +0,0 @@ -/* macros/chain.h - * - * This include file contains the bodies of the routines which are - * associated with doubly linked chains and 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 __MACROS_CHAIN_h -#define __MACROS_CHAIN_h - -/*PAGE - * - * _Chain_Are_nodes_equal - */ - -#define _Chain_Are_nodes_equal( _left, _right ) \ - ( (_left) == (_right) ) - -/*PAGE - * - * _Chain_Is_null - */ - -#define _Chain_Is_null( _the_chain ) \ - ( (_the_chain) == NULL ) - -/*PAGE - * - * _Chain_Is_null_node - */ - -#define _Chain_Is_null_node( _the_node ) \ - ( (_the_node) == NULL ) - -/*PAGE - * - * _Chain_Head - */ - -#define _Chain_Head( _the_chain ) \ - ((Chain_Node *) (_the_chain)) - -/*PAGE - * - * _Chain_Tail - */ - -#define _Chain_Tail( _the_chain ) \ - ((Chain_Node *) &(_the_chain)->permanent_null) - -/*PAGE - * - * _Chain_Is_empty - */ - -#define _Chain_Is_empty( _the_chain ) \ - ( (_the_chain)->first == _Chain_Tail( (_the_chain) ) ) - -/*PAGE - * - * _Chain_Is_first - */ - -#define _Chain_Is_first( _the_node ) \ - ( (the_node)->previous == NULL ) - -/*PAGE - * - * _Chain_Is_last - */ - -#define _Chain_Is_last( _the_node ) \ - ( (_the_node)->next == NULL ) - -/*PAGE - * - * _Chain_Has_only_one_node - */ - -#define _Chain_Has_only_one_node( _the_chain ) \ - ( (_the_chain)->first == (_the_chain)->last ) - -/*PAGE - * - * _Chain_Is_head - */ - -#define _Chain_Is_head( _the_chain, _the_node ) \ - ( (_the_node) == _Chain_Head( (_the_chain) ) ) - -/*PAGE - * - * _Chain_Is_tail - */ - -#define _Chain_Is_tail( _the_chain, _the_node ) \ - ( (_the_node) == _Chain_Tail( (_the_chain) ) ) - -/*PAGE - * - * Chain_Initialize_empty - */ - -#define _Chain_Initialize_empty( _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 - */ - -#define _Chain_Extract_unprotected( _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_unprotected - */ - -/*PAGE - * - * Chain_Get_unprotected - */ - -#define _Chain_Get_unprotected( _the_chain ) \ - (( !_Chain_Is_empty( (_the_chain) ) ) \ - ? _Chain_Get_first_unprotected( (_the_chain) ) \ - : NULL) - -/*PAGE - * - * _Chain_Insert_unprotected - */ - -#define _Chain_Insert_unprotected( _after_node, _the_node ) \ -do { \ - 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); \ -} while (0) - -/*PAGE - * - * _Chain_Append_unprotected - */ - -#define _Chain_Append_unprotected( _the_chain, _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 - */ - -#define _Chain_Prepend_unprotected( _the_chain, _the_node ) \ - _Chain_Insert_unprotected( _Chain_Head( (_the_chain) ), (_the_node) ) - -/*PAGE - * - * _Chain_Prepend - */ - -#define _Chain_Prepend( _the_chain, _the_node ) \ - _Chain_Insert( _Chain_Head( (_the_chain) ), (_the_node) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/coremsg.inl b/c/src/exec/score/macros/rtems/score/coremsg.inl deleted file mode 100644 index c37c307287..0000000000 --- a/c/src/exec/score/macros/rtems/score/coremsg.inl +++ /dev/null @@ -1,144 +0,0 @@ -/* coremsg.inl - * - * This include file contains the macro 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 - -/*PAGE - * - * _CORE_message_queue_Send - * - */ - -#define _CORE_message_queue_Send( _the_message_queue, _buffer, _size, \ - _id, _api_message_queue_mp_support, _wait, _timeout ) \ - _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \ - (_id), (_api_message_queue_mp_support), \ - CORE_MESSAGE_QUEUE_SEND_REQUEST, (_wait), (_timeout) ) - -/*PAGE - * - * _CORE_message_queue_Urgent - * - */ - -#define _CORE_message_queue_Urgent( _the_message_queue, _buffer, _size, \ - _id, _api_message_queue_mp_support, _wait, _timeout ) \ - _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \ - (_id), (_api_message_queue_mp_support), \ - CORE_MESSAGE_QUEUE_URGENT_REQUEST, (_wait), (_timeout) ) - -/*PAGE - * - * _CORE_message_queue_Copy_buffer - */ - -#define _CORE_message_queue_Copy_buffer( _source, _destination, _size ) \ - memcpy( _destination, _source, _size) - -/*PAGE - * - * _CORE_message_queue_Allocate_message_buffer - * - */ - -#define _CORE_message_queue_Allocate_message_buffer( _the_message_queue ) \ - (CORE_message_queue_Buffer_control *) \ - _Chain_Get( &(_the_message_queue)->Inactive_messages ) - -/*PAGE - * - * _CORE_message_queue_Free_message_buffer - * - */ - -#define _CORE_message_queue_Free_message_buffer( _the_message_queue, _the_message ) \ - _Chain_Append( \ - &(_the_message_queue)->Inactive_messages, \ - &(_the_message)->Node \ - ) - -/*PAGE - * - * _CORE_message_queue_Is_priority - * - */ - -#define _CORE_message_queue_Is_priority( _the_attribute ) \ - ((_the_attribute)->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY) - -/*PAGE - * - * _CORE_message_queue_Get_pending_message - * - */ - -#define _CORE_message_queue_Get_pending_message( _the_message_queue ) \ - (CORE_message_queue_Buffer_control *) \ - _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages ) - -/*PAGE - * - * _CORE_message_queue_Append - * - */ - -#define _CORE_message_queue_Append( _the_message_queue, _the_message ) \ - _Chain_Append( &(_the_message_queue)->Pending_messages, \ - &(_the_message)->Node ) - -/*PAGE - * - * _CORE_message_queue_Prepend - * - */ - -#define _CORE_message_queue_Prepend( _the_message_queue, _the_message ) \ - _Chain_Prepend( &(_the_message_queue)->Pending_messages, \ - &(_the_message)->Node ) - -/*PAGE - * - * _CORE_message_queue_Is_null - * - */ - -#define _CORE_message_queue_Is_null( _the_message_queue ) \ - ( (_the_message_queue) == NULL ) - -/*PAGE - * - * _CORE_message_queue_Is_notify_enabled - * - */ - -#define _CORE_message_queue_Is_notify_enabled( _the_message_queue ) \ - ( (_the_message_queue)->notify_handler != NULL ) - -/*PAGE - * - * _CORE_message_queue_Set_notify - * - */ - -#define _CORE_message_queue_Set_notify( \ - _the_message_queue, _the_handler, _the_argument ) \ - do { \ - (_the_message_queue)->notify_handler = (_the_handler); \ - (_the_message_queue)->notify_argument = (_the_argument); \ - } while ( 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/coremutex.inl b/c/src/exec/score/macros/rtems/score/coremutex.inl deleted file mode 100644 index 90323374e5..0000000000 --- a/c/src/exec/score/macros/rtems/score/coremutex.inl +++ /dev/null @@ -1,81 +0,0 @@ -/* macros/coremutex.h - * - * This include file contains all of the inlined routines associated - * with 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 __MACROS_CORE_MUTEX_h -#define __MACROS_CORE_MUTEX_h - - -/*PAGE - * - * _CORE_mutex_Is_locked - * - */ - -#define _CORE_mutex_Is_locked( _the_mutex ) \ - ( (_the_mutex)->lock == CORE_MUTEX_LOCKED ) - -/*PAGE - * - * _CORE_mutex_Is_fifo - * - */ - -#define _CORE_mutex_Is_fifo( _the_attribute ) \ - ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_FIFO ) - -/*PAGE - * - * _CORE_mutex_Is_priority - * - */ - -#define _CORE_mutex_Is_priority( _the_attribute ) \ - ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) - -/*PAGE - * - * _CORE_mutex_Is_inherit_priority - * - */ - -#define _CORE_mutex_Is_inherit_priority( _the_attribute ) \ - ( (_the_attribute)->discipline == \ - CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT ) - -/*PAGE - * - * _CORE_mutex_Is_priority_ceiling - * - */ - -#define _CORE_mutex_Is_priority_ceiling( _the_attribute )\ - ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING ) - -/*PAGE - * - * _CORE_mutex_Seize_interrupt_trylock - * - * NOTE: This is not really a MACRO version of this routine. - * A body is in coremutexseize.c that is duplicated - * from the .inl by hand. - */ - -int _CORE_mutex_Seize_interrupt_trylock( - CORE_mutex_Control *the_mutex, - ISR_Level *level_p -); - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/coresem.inl b/c/src/exec/score/macros/rtems/score/coresem.inl deleted file mode 100644 index eebb34d3c2..0000000000 --- a/c/src/exec/score/macros/rtems/score/coresem.inl +++ /dev/null @@ -1,71 +0,0 @@ -/* macros/coresem.h - * - * This include file contains all of the inlined routines associated - * with core semaphores. - * - * 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 __MACROS_CORE_SEMAPHORE_h -#define __MACROS_CORE_SEMAPHORE_h - -/*PAGE - * - * _CORE_semaphore_Is_priority - * - */ - -#define _CORE_semaphore_Is_priority( _the_attribute ) \ - ( (_the_attribute)->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY ) - -/*PAGE - * - * _CORE_semaphore_Get_count - * - */ - -#define _CORE_semaphore_Get_count( _the_semaphore ) \ - ( (_the_semaphore)->count ) - -/*PAGE - * - * _CORE_semaphore_Seize_isr_disable - */ - -#define _CORE_semaphore_Seize_isr_disable( \ - _the_semaphore, _id, _wait, _timeout, _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 ); \ - } else if ( !(_wait) ) { \ - _ISR_Enable( level ); \ - executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; \ - } else { \ - _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/macros/rtems/score/heap.inl b/c/src/exec/score/macros/rtems/score/heap.inl deleted file mode 100644 index 6c2016be8d..0000000000 --- a/c/src/exec/score/macros/rtems/score/heap.inl +++ /dev/null @@ -1,149 +0,0 @@ -/* heap.inl - * - * This file contains the macro 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 - */ - -#define _Heap_Head( _the_heap ) \ - ((Heap_Block *)&(_the_heap)->start) - -/*PAGE - * - * _Heap_Tail - */ - -#define _Heap_Tail( _the_heap ) \ - ((Heap_Block *)&(_the_heap)->final) - -/*PAGE - * - * _Heap_Previous_block - */ - -#define _Heap_Previous_block( _the_block ) \ - ( (Heap_Block *) _Addresses_Subtract_offset( \ - (void *)(_the_block), \ - (_the_block)->back_flag & ~ HEAP_BLOCK_USED \ - ) \ - ) - -/*PAGE - * - * _Heap_Next_block - */ - -#define _Heap_Next_block( _the_block ) \ - ( (Heap_Block *) _Addresses_Add_offset( \ - (void *)(_the_block), \ - (_the_block)->front_flag & ~ HEAP_BLOCK_USED \ - ) \ - ) - -/*PAGE - * - * _Heap_Block_at - */ - -#define _Heap_Block_at( _base, _offset ) \ - ( (Heap_Block *) \ - _Addresses_Add_offset( (void *)(_base), (_offset) ) ) - -/*PAGE - * - * _Heap_User_block_at - * - */ - -#define _Heap_User_block_at( _base ) \ - _Heap_Block_at( \ - (_base), \ - -*(((unsigned32 *) (_base)) - 1) + -HEAP_BLOCK_USED_OVERHEAD \ - ) - -/*PAGE - * - * _Heap_Is_previous_block_free - */ - -#define _Heap_Is_previous_block_free( _the_block ) \ - ( !((_the_block)->back_flag & HEAP_BLOCK_USED) ) - -/*PAGE - * - * _Heap_Is_block_free - */ - -#define _Heap_Is_block_free( _the_block ) \ - ( !((_the_block)->front_flag & HEAP_BLOCK_USED) ) - -/*PAGE - * - * _Heap_Is_block_used - */ - -#define _Heap_Is_block_used( _the_block ) \ - ((_the_block)->front_flag & HEAP_BLOCK_USED) - -/*PAGE - * - * _Heap_Block_size - */ - -#define _Heap_Block_size( _the_block ) \ - ((_the_block)->front_flag & ~HEAP_BLOCK_USED) - -/*PAGE - * - * _Heap_Start_of_user_area - */ - -#define _Heap_Start_of_user_area( _the_block ) \ - ((void *) &(_the_block)->next) - -/*PAGE - * - * _Heap_Is_block_in - */ - -#define _Heap_Is_block_in( _the_heap, _the_block ) \ - ( ((_the_block) >= (_the_heap)->start) && \ - ((_the_block) <= (_the_heap)->final) ) - -/*PAGE - * - * _Heap_Is_page_size_valid - */ - -#define _Heap_Is_page_size_valid( _page_size ) \ - ( ((_page_size) != 0) && \ - (((_page_size) % CPU_HEAP_ALIGNMENT) == 0) ) - -/*PAGE - * - * _Heap_Build_flag - */ - -#define _Heap_Build_flag( _size, _in_use_flag ) \ - ( (_size) | (_in_use_flag)) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/isr.inl b/c/src/exec/score/macros/rtems/score/isr.inl deleted file mode 100644 index b75d6b002d..0000000000 --- a/c/src/exec/score/macros/rtems/score/isr.inl +++ /dev/null @@ -1,38 +0,0 @@ -/* isr.inl - * - * This include file contains the macro 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 - * - */ - -#define _ISR_Is_vector_number_valid( _vector ) \ - ( (_vector) <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER ) - -/*PAGE - * - * _ISR_Is_valid_user_handler - * - */ - -#define _ISR_Is_valid_user_handler( _handler ) \ - ((_handler) != NULL) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/mppkt.inl b/c/src/exec/score/macros/rtems/score/mppkt.inl deleted file mode 100644 index ca88f64907..0000000000 --- a/c/src/exec/score/macros/rtems/score/mppkt.inl +++ /dev/null @@ -1,40 +0,0 @@ -/* macros/mppkt.h - * - * 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 __MACROS_MP_PACKET_h -#define __MACROS_MP_PACKET_h - -/*PAGE - * - * _Mp_packet_Is_valid_packet_class - * - * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary - * because this enum starts at lower bound of zero. - */ - -#define _Mp_packet_Is_valid_packet_class( _the_packet_class ) \ - ( (_the_packet_class) <= MP_PACKET_CLASSES_LAST ) - -/*PAGE - * - * _Mp_packet_Is_null - * - */ - -#define _Mp_packet_Is_null ( _the_packet ) \ - ( (_the_packet) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/object.inl b/c/src/exec/score/macros/rtems/score/object.inl deleted file mode 100644 index 10721497f2..0000000000 --- a/c/src/exec/score/macros/rtems/score/object.inl +++ /dev/null @@ -1,188 +0,0 @@ -/* object.inl - * - * This include file contains the macro implementation of all - * of the inlined routines in the Object 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 __OBJECTS_inl -#define __OBJECTS_inl - -/*PAGE - * - * _Objects_Build_id - * - */ - -#define _Objects_Build_id( _the_api, _the_class, _node, _index ) \ - ( (( (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 - */ - -#define _Objects_Get_API( _id ) \ - (Objects_APIs) \ - (((_id) >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS) - -/*PAGE - * - * _Objects_Get_class - */ - -#define _Objects_Get_class( _id ) \ - (unsigned32) \ - (((_id) >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS) - -/*PAGE - * - * _Objects_Get_node - * - */ - -#define _Objects_Get_node( _id ) \ - (((_id) >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS) - -/*PAGE - * - * _Objects_Get_index - * - */ - -#define _Objects_Get_index( _id ) \ - (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS) - -/*PAGE - * - * _Objects_Is_class_valid - * - */ - -#define _Objects_Is_class_valid( _the_class ) \ - ( (_the_class) /* XXX && (_the_class) <= OBJECTS_CLASSES_LAST */ ) - -/*PAGE - * - * _Objects_Is_local_node - * - */ - -#define _Objects_Is_local_node( _node ) \ - ( (_node) == _Objects_Local_node ) - -/*PAGE - * - * _Objects_Is_local_id - * - */ - -#define _Objects_Is_local_id( _id ) \ - _Objects_Is_local_node( _Objects_Get_node(_id) ) - -/*PAGE - * - * _Objects_Are_ids_equal - * - */ - -#define _Objects_Are_ids_equal( _left, _right ) \ - ( (_left) == (_right) ) - -/*PAGE - * - * _Objects_Get_local_object - * - */ - -#define _Objects_Get_local_object( _information, _index ) \ - ( ( (_index) > (_information)->maximum) ? NULL : \ - (_information)->local_table[ (_index) ] ) - -/*PAGE - * - * _Objects_Set_local_object - * - */ - -#define _Objects_Set_local_object( information, index, the_object ) \ - { \ - if ( index <= information->maximum) \ - information->local_table[ index ] = the_object; \ - } - - -/*PAGE - * - * _Objects_Get_information - * - */ - -#define _Objects_Get_information( id ) \ - ( \ - ( !_Objects_Is_class_valid( _Objects_Get_class( id ) ) ) ? \ - NULL : \ - _Objects_Information_table[ _Objects_Get_API( id ) ] \ - [ _Objects_Get_class( id ) ] \ - ) - -/*PAGE - * - * _Objects_Open - * - */ - -#define _Objects_Open( _information, _the_object, _name ) \ - do { \ - 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 ); */\ - (_the_object)->name = (_name); \ - else \ - /* _Objects_Copy_name_raw( \ - (_name), (_the_object)->name, (_information)->name_length ); */ \ - (_the_object)->name = (_name); \ - } while (0) - -/*PAGE - * - * _Objects_Close - * - */ - -#define _Objects_Close( _information, _the_object ) \ - do { \ - 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 ); */ \ - (_the_object)->name = 0; \ - } while (0) - -/*PAGE - * - * _Objects_Namespace_remove - */ - -#define _Objects_Namespace_remove( _information, _the_object ) \ - (_the_object)->name = 0; \ - _Objects_Clear_name( (_the_object)->name, (_information)->name_length ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/objectmp.inl b/c/src/exec/score/macros/rtems/score/objectmp.inl deleted file mode 100644 index ce5550018d..0000000000 --- a/c/src/exec/score/macros/rtems/score/objectmp.inl +++ /dev/null @@ -1,49 +0,0 @@ -/* macros/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 __MACROS_MP_OBJECTS_inl -#define __MACROS_MP_OBJECTS_inl - -/*PAGE - * - * _Objects_MP_Allocate_global_object - * - */ - -#define _Objects_MP_Allocate_global_object() \ - (Objects_MP_Control *) \ - _Chain_Get( &_Objects_MP_Inactive_global_objects ) - -/*PAGE - * _Objects_MP_Free_global_object - * - */ - -#define _Objects_MP_Free_global_object( _the_object ) \ - _Chain_Append( \ - &_Objects_MP_Inactive_global_objects, \ - &(_the_object)->Object.Node \ - ) - -/*PAGE - * _Objects_MP_Is_null_global_object - * - */ - -#define _Objects_MP_Is_null_global_object( _the_object ) \ - ( (_the_object) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/priority.inl b/c/src/exec/score/macros/rtems/score/priority.inl deleted file mode 100644 index f8598abb5c..0000000000 --- a/c/src/exec/score/macros/rtems/score/priority.inl +++ /dev/null @@ -1,169 +0,0 @@ -/* priority.inl - * - * This file contains the macro 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 - * - */ - -#define _Priority_Handler_initialization() \ - { \ - unsigned32 index; \ - \ - _Priority_Major_bit_map = 0; \ - for ( index=0 ; index <16 ; index++ ) \ - _Priority_Bit_map[ index ] = 0; \ - } - -/*PAGE - * - * _Priority_Is_valid - * - */ - - /* - * Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned, - * then checking for less than 0 is unnecessary. - */ - -#define _Priority_Is_valid( _the_priority ) \ - ( (_the_priority) <= PRIORITY_MAXIMUM ) - -/*PAGE - * - * _Priority_Major - * - */ - -#define _Priority_Major( _the_priority ) ( (_the_priority) / 16 ) - -/*PAGE - * - * _Priority_Minor - * - */ - -#define _Priority_Minor( _the_priority ) ( (_the_priority) % 16 ) - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) - -/*PAGE - * - * _Priority_Mask - * - */ - -#define _Priority_Mask( _bit_number ) \ - (0x8000 >> _bit_number) - -/*PAGE - * - * _Priority_Bits_index - * - */ - -#define _Priority_Bits_index( _bit_number ) \ - (_bit_number) - -#endif - -/*PAGE - * - * _Priority_Add_to_bit_map - * - */ - -#define _Priority_Add_to_bit_map( _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 - * - */ - -#define _Priority_Remove_from_bit_map( _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 - * - */ - -#define _Priority_Get_highest( _high_priority ) \ - { \ - 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 ); \ - \ - (_high_priority) = (_Priority_Bits_index( major ) * 16) + \ - _Priority_Bits_index( minor ); \ - } - -/*PAGE - * - * _Priority_Initialize_information - * - */ - -#define _Priority_Initialize_information( \ - _the_priority_map, _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 - * - */ - -#define _Priority_Is_group_empty ( _the_priority ) \ - ( (_the_priority) == 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/stack.inl b/c/src/exec/score/macros/rtems/score/stack.inl deleted file mode 100644 index fc0c94a980..0000000000 --- a/c/src/exec/score/macros/rtems/score/stack.inl +++ /dev/null @@ -1,49 +0,0 @@ -/* stack.inl - * - * This file contains the macro 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 - * - */ - -#define _Stack_Initialize( _the_stack, _starting_address, _size ) \ - { \ - (_the_stack)->area = (_starting_address); \ - (_the_stack)->size = (_size); \ - } - -/*PAGE - * - * _Stack_Is_enough - * - */ - -#define _Stack_Is_enough( _size ) \ - ( (_size) >= STACK_MINIMUM_SIZE ) - -/*PAGE - * - * _Stack_Adjust_size - */ - -#define _Stack_Adjust_size( _size ) \ - ((_size) + CPU_STACK_ALIGNMENT) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/states.inl b/c/src/exec/score/macros/rtems/score/states.inl deleted file mode 100644 index 05a816f18d..0000000000 --- a/c/src/exec/score/macros/rtems/score/states.inl +++ /dev/null @@ -1,209 +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 - * - */ - -#define _States_Set( _states_to_set, _current_state ) \ - ((_current_state) | (_states_to_set)) - -/*PAGE - * - * _States_Clear - * - */ - -#define _States_Clear( _states_to_clear, _current_state ) \ - ((_current_state) & ~(_states_to_clear)) - -/*PAGE - * - * _States_Is_ready - * - */ - -#define _States_Is_ready( _the_states ) \ - ( (_the_states) == STATES_READY ) - -/*PAGE - * - * _States_Is_only_dormant - * - */ - -#define _States_Is_only_dormant( _the_states ) \ - ( (_the_states) == STATES_DORMANT ) - -/*PAGE - * - * _States_Is_dormant - * - */ - -#define _States_Is_dormant( _the_states ) \ - ( (_the_states) & STATES_DORMANT ) - -/*PAGE - * - * _States_Is_suspended - * - */ - -#define _States_Is_suspended( _the_states ) \ - ( (_the_states) & STATES_SUSPENDED ) - -/*PAGE - * - * _States_Is_Transient - * - */ - -#define _States_Is_transient( _the_states ) \ - ( (_the_states) & STATES_TRANSIENT ) - -/*PAGE - * - * _States_Is_delaying - * - */ - -#define _States_Is_delaying( _the_states ) \ - ( (_the_states) & STATES_DELAYING ) - -/*PAGE - * - * _States_Is_waiting_for_buffer - * - */ - -#define _States_Is_waiting_for_buffer( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_BUFFER ) - -/*PAGE - * - * _States_Is_waiting_for_segment - * - */ - -#define _States_Is_waiting_for_segment( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_SEGMENT ) - -/*PAGE - * - * _States_Is_waiting_for_message - * - */ - -#define _States_Is_waiting_for_message( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_MESSAGE ) - -/*PAGE - * - * _States_Is_waiting_for_event - * - */ - -#define _States_Is_waiting_for_event( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_EVENT ) - -/*PAGE - * - * _States_Is_waiting_for_mutex - * - */ - -#define _States_Is_waiting_for_mutex( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_MUTEX ) - -/*PAGE - * - * _States_Is_waiting_for_semaphore - * - */ - -#define _States_Is_waiting_for_semaphore( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_SEMAPHORE ) - -/*PAGE - * - * _States_Is_waiting_for_time - * - */ - -#define _States_Is_waiting_for_time( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_TIME ) - -/*PAGE - * - * _States_Is_waiting_for_rpc_reply - * - */ - -#define _States_Is_waiting_for_rpc_reply( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_RPC_REPLY ) - -/*PAGE - * - * _States_Is_waiting_for_period - * - */ - -#define _States_Is_waiting_for_period( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_PERIOD ) - -/*PAGE - * - * _States_Is_locally_blocked - * - */ - -#define _States_Is_locally_blocked( _the_states ) \ - ( (_the_states) & STATES_LOCALLY_BLOCKED ) - -/*PAGE - * - * _States_Is_waiting_on_thread_queue - * - */ - -#define _States_Is_waiting_on_thread_queue( _the_states ) \ - ( (_the_states) & STATES_WAITING_ON_THREAD_QUEUE ) - -/*PAGE - * - * _States_Is_blocked - * - */ - -#define _States_Is_blocked( _the_states ) \ - ( (_the_states) & STATES_BLOCKED ) - -/*PAGE - * - * _States_Are_set - * - */ - -#define _States_Are_set( _the_states, _mask ) \ - ( ((_the_states) & (_mask)) != STATES_READY ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/sysstate.inl b/c/src/exec/score/macros/rtems/score/sysstate.inl deleted file mode 100644 index ac4197e8c6..0000000000 --- a/c/src/exec/score/macros/rtems/score/sysstate.inl +++ /dev/null @@ -1,89 +0,0 @@ -/* sysstates.inl - * - * This file contains the macro 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 - */ - -#define _System_state_Handler_initialization( _is_multiprocessing ) \ - do { \ - _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; \ - _System_state_Is_multiprocessing = (_is_multiprocessing); \ - } while ( 0 ) - -/*PAGE - * - * _System_state_Set - */ - -#define _System_state_Set( _state ) \ - do { \ - _System_state_Current = (_state); \ - } while ( 0 ) - -/*PAGE - * - * _System_state_Get - */ - -#define _System_state_Get() \ - (_System_state_Current) - -/*PAGE - * - * _System_state_Is_before_initialization - */ - -#define _System_state_Is_before_initialization( _state ) \ - ((_state) == SYSTEM_STATE_BEFORE_INITIALIZATION) - -/*PAGE - * - * _System_state_Is_before_multitasking - */ - -#define _System_state_Is_before_multitasking( _state ) \ - ((_state) == SYSTEM_STATE_BEFORE_MULTITASKING) - -/*PAGE - * - * _System_state_Is_begin_multitasking - */ - -#define _System_state_Is_begin_multitasking( _state ) \ - ((_state) == SYSTEM_STATE_BEGIN_MULTITASKING) - -/*PAGE - * - * _System_state_Is_up - */ - -#define _System_state_Is_up( _state ) \ - ((_state) == SYSTEM_STATE_UP) - -/*PAGE - * - * _System_state_Is_failed - */ - -#define _System_state_Is_failed( _state ) \ - ((_state) == SYSTEM_STATE_FAILED) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/thread.inl b/c/src/exec/score/macros/rtems/score/thread.inl deleted file mode 100644 index 6abb287d8b..0000000000 --- a/c/src/exec/score/macros/rtems/score/thread.inl +++ /dev/null @@ -1,234 +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 - * - */ - -#define _Thread_Stop_multitasking() \ - _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); - -/*PAGE - * - * _Thread_Is_executing - * - */ - -#define _Thread_Is_executing( _the_thread ) \ - ( (_the_thread) == _Thread_Executing ) - -/*PAGE - * - * _Thread_Is_heir - * - */ - -#define _Thread_Is_heir( _the_thread ) \ - ( (_the_thread) == _Thread_Heir ) - -/*PAGE - * - * _Thread_Is_executing_also_the_heir - * - */ - -#define _Thread_Is_executing_also_the_heir() \ - ( _Thread_Executing == _Thread_Heir ) - -/*PAGE - * - * _Thread_Unblock - * - */ - -#define _Thread_Unblock( _the_thread ) \ - _Thread_Clear_state( (_the_thread), STATES_BLOCKED ); - -/*PAGE - * - * _Thread_Restart_self - * - */ - -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -#define _Thread_Restart_self() \ - { \ - if ( _Thread_Executing->fp_context != NULL ) \ - _Context_Restore_fp( &_Thread_Executing->fp_context ); \ - \ - _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ - } -#else -#define _Thread_Restart_self() \ - { \ - _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ - } -#endif - -/*PAGE - * - * _Thread_Calculate_heir - * - */ - -#define _Thread_Calculate_heir() \ - { \ - Priority_Control highest; \ - \ - _Priority_Get_highest( highest ); \ - \ - _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ highest ].first; \ - } - -/*PAGE - * - * _Thread_Is_allocated_fp - * - */ - -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -#define _Thread_Is_allocated_fp( _the_thread ) \ - ( (_the_thread) == _Thread_Allocated_fp ) -#endif - -/*PAGE - * - * _Thread_Deallocate_fp - * - */ - -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -#define _Thread_Deallocate_fp() \ - _Thread_Allocated_fp = NULL -#endif - -/*PAGE - * - * _Thread_Disable_dispatch - * - */ - -#define _Thread_Disable_dispatch() \ - _Thread_Dispatch_disable_level += 1 - -/*PAGE - * - * _Thread_Enable_dispatch - * - */ - -#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) -#define _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 - * - */ - -#define _Thread_Unnest_dispatch() \ - _Thread_Dispatch_disable_level -= 1 - -/*PAGE - * - * _Thread_Is_dispatching_enabled - * - */ - -#define _Thread_Is_dispatching_enabled() \ - ( _Thread_Dispatch_disable_level == 0 ) - -/*PAGE - * - * _Thread_Is_context_switch_necessary - * - */ - -#define _Thread_Is_context_switch_necessary() \ - ( _Context_Switch_necessary == TRUE ) - -/*PAGE - * - * _Thread_Dispatch_initialization - * - */ - -#define _Thread_Dispatch_initialization() \ - _Thread_Dispatch_disable_level = 1 - -/*PAGE - * - * _Thread_Is_null - * - */ - -#define _Thread_Is_null( _the_thread ) \ - ( (_the_thread) == NULL ) - -/* - * _Thread_Is_proxy_blocking - * - */ - -#define _Thread_Is_proxy_blocking( _code ) \ - ( (_code) == THREAD_STATUS_PROXY_BLOCKING ) - -/* - * _Thread_Internal_allocate - * - */ - -#define _Thread_Internal_allocate() \ - ((Thread_Control *) _Objects_Allocate( &_Thread_Internal_information )) - -/* - * _Thread_Internal_free - * - */ - -#define _Thread_Internal_free( _the_task ) \ - _Objects_Free( &_Thread_Internal_information, &(_the_task)->Object ) - -/* - * _Thread_Get_libc_reent - */ - -#define _Thread_Get_libc_reent() \ - (_Thread_libc_reent) - -/* - * _Thread_Set_libc_reent - */ - -#define _Thread_Set_libc_reent(_libc_reent) \ - do { \ - _Thread_libc_reent = (_libc_reent); \ - } while (0) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/threadmp.inl b/c/src/exec/score/macros/rtems/score/threadmp.inl deleted file mode 100644 index 975403860d..0000000000 --- a/c/src/exec/score/macros/rtems/score/threadmp.inl +++ /dev/null @@ -1,49 +0,0 @@ -/* macros/threadmp.h - * - * 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 __MACROS_MP_THREAD_h -#define __MACROS_MP_THREAD_h - -/*PAGE - * - * _Thread_MP_Is_receive - * - */ - -#define _Thread_MP_Is_receive( _the_thread ) \ - ( (_the_thread) == _Thread_MP_Receive) - -/*PAGE - * - * _Thread_MP_Free_proxy - * - */ - -#define _Thread_MP_Free_proxy( _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/macros/rtems/score/tod.inl b/c/src/exec/score/macros/rtems/score/tod.inl deleted file mode 100644 index 2fa91b127b..0000000000 --- a/c/src/exec/score/macros/rtems/score/tod.inl +++ /dev/null @@ -1,48 +0,0 @@ -/* tod.inl - * - * This file contains the macro 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 - * - */ - -#define _TOD_Tickle_ticks() \ - _TOD_Current.ticks++; \ - _Watchdog_Ticks_since_boot++ - -/*PAGE - * - * _TOD_Deactivate - * - */ - -#define _TOD_Deactivate() \ - _Watchdog_Remove( &_TOD_Seconds_watchdog ) - -/*PAGE - * - * _TOD_Activate - * - */ - -#define _TOD_Activate( _ticks ) \ - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/tqdata.inl b/c/src/exec/score/macros/rtems/score/tqdata.inl deleted file mode 100644 index 96be35427b..0000000000 --- a/c/src/exec/score/macros/rtems/score/tqdata.inl +++ /dev/null @@ -1,49 +0,0 @@ -/* tqdata.inl - * - * This file contains the macro 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 - * - */ - -#define _Thread_queue_Header_number( _the_priority ) \ - ((_the_priority) / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER) - -/*PAGE - * - * _Thread_queue_Is_reverse_search - * - */ - -#define _Thread_queue_Is_reverse_search( _the_priority ) \ - ( (_the_priority) & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK ) - -/*PAGE - * - * _Thread_queue_Enter_critical_section - * - */ - -#define _Thread_queue_Enter_critical_section( _the_thread_queue ) \ - do { \ - (_the_thread_queue)->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; \ - } while ( 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/userext.inl b/c/src/exec/score/macros/rtems/score/userext.inl deleted file mode 100644 index 2c95e6a04e..0000000000 --- a/c/src/exec/score/macros/rtems/score/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-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 - * - * NOTE: Must be before _User_extensions_Handler_initialization to - * ensure proper inlining. - */ - -#define _User_extensions_Add_set( _the_extension, _extension_table ) \ - do { \ - (_the_extension)->Callouts = *(_extension_table); \ - \ - _Chain_Append( &_User_extensions_List, &(_the_extension)->Node ); \ - \ - 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 \ - ); \ - } \ - } while ( 0 ) - - -/*PAGE - * - * _User_extensions_Handler_initialization - * - */ - -#define _User_extensions_Handler_initialization( \ - _number_of_extensions, _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( \ - sizeof(User_extensions_Control) * _number_of_extensions ); \ - \ - 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 - */ - -#define _User_extensions_Add_API_set( _the_extension ) \ - do { \ - _Chain_Append( &_User_extensions_List, &(_the_extension)->Node ); \ - \ - 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 ); \ - } \ - } while ( 0 ) - -/*PAGE - * - * _User_extensions_Remove_set - */ - -#define _User_extensions_Remove_set( _the_extension ) \ - do { \ - _Chain_Extract( &(_the_extension)->Node ); \ - \ - if ( (_the_extension)->Callouts.thread_switch != NULL ) { \ - _Chain_Extract( &(_the_extension)->Node ); \ - } \ - } while (0) - -/*PAGE - * - * _User_extensions_Thread_switch - * - */ - -#define _User_extensions_Thread_switch( _executing, _heir ) \ - do { \ - 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 ); \ - } \ - } while (0) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/watchdog.inl b/c/src/exec/score/macros/rtems/score/watchdog.inl deleted file mode 100644 index 53a88eacad..0000000000 --- a/c/src/exec/score/macros/rtems/score/watchdog.inl +++ /dev/null @@ -1,171 +0,0 @@ -/* watchdog.inl - * - * This file contains the macro 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 - -#include - -/*PAGE - * - * _Watchdog_Initialize - * - */ - -#define _Watchdog_Initialize( _the_watchdog, _routine, _id, _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 - * - */ - -#define _Watchdog_Is_active( _the_watchdog ) \ - ( (_the_watchdog)->state == WATCHDOG_ACTIVE ) - -/*PAGE - * - * _Watchdog_Activate - * - */ - -#define _Watchdog_Activate( _the_watchdog ) \ - (_the_watchdog)->state = WATCHDOG_ACTIVE - -/*PAGE - * - * _Watchdog_Deactivate - * - */ - -#define _Watchdog_Deactivate( _the_watchdog ) \ - (_the_watchdog)->state = WATCHDOG_REMOVE_IT - -/*PAGE - * - * _Watchdog_Tickle_ticks - * - */ - -#define _Watchdog_Tickle_ticks() \ - _Watchdog_Tickle( &_Watchdog_Ticks_chain ) - -/*PAGE - * - * _Watchdog_Tickle_seconds - * - */ - -#define _Watchdog_Tickle_seconds() \ - _Watchdog_Tickle( &_Watchdog_Seconds_chain ) - -/*PAGE - * - * _Watchdog_Insert_ticks - * - */ - -#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \ - do { \ - (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ - } while ( 0 ) - -/*PAGE - * - * _Watchdog_Insert_seconds - * - */ - -#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \ - do { \ - (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \ - } while ( 0 ) - -/*PAGE - * - * _Watchdog_Adjust_seconds - * - */ - -#define _Watchdog_Adjust_seconds( _direction, _units ) \ - _Watchdog_Adjust( &_Watchdog_Seconds_chain, (_direction), (_units) ) - -/*PAGE - * - * _Watchdog_Adjust_ticks - * - */ - -#define _Watchdog_Adjust_ticks( _direction, _units ) \ - _Watchdog_Adjust( &_Watchdog_Ticks_chain, (_direction), (_units) ) - -/*PAGE - * - * _Watchdog_Reset - * - */ - -#define _Watchdog_Reset( _the_watchdog ) \ - { \ - (void) _Watchdog_Remove( (_the_watchdog) ); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ - } - -/*PAGE - * - * _Watchdog_Next - * - */ - -#define _Watchdog_Next( _watchdog ) \ - ((Watchdog_Control *) (_watchdog)->Node.next) - -/*PAGE - * - * _Watchdog_Previous - * - */ - -#define _Watchdog_Previous( _watchdog ) \ - ((Watchdog_Control *) (_watchdog)->Node.previous) - -/*PAGE - * - * _Watchdog_First - * - */ - -#define _Watchdog_First( _header ) \ - ((Watchdog_Control *) (_header)->first) - -/*PAGE - * - * _Watchdog_Last - * - */ - -#define _Watchdog_Last( _header ) \ - ((Watchdog_Control *) (_header)->last) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/wkspace.inl b/c/src/exec/score/macros/rtems/score/wkspace.inl deleted file mode 100644 index e327d27349..0000000000 --- a/c/src/exec/score/macros/rtems/score/wkspace.inl +++ /dev/null @@ -1,38 +0,0 @@ -/* wkspace.inl - * - * This file contains the macro implementation of the inlined routines - * from the RAM Workspace 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 __WORKSPACE_inl -#define __WORKSPACE_inl - -/*PAGE - * - * _Workspace_Allocate - * - */ - -#define _Workspace_Allocate( _size ) \ - _Heap_Allocate( &_Workspace_Area, (_size) ) - -/*PAGE - * - * _Workspace_Free - * - */ - -#define _Workspace_Free( _block ) \ - _Heap_Free( &_Workspace_Area, (_block) ) - -#endif -/* end of include file */ -- cgit v1.2.3