diff options
Diffstat (limited to 'cpukit/rtems/macros/rtems/rtems')
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/asr.inl | 90 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/attr.inl | 91 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/dpmem.inl | 59 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/event.inl | 21 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/eventset.inl | 53 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/message.inl | 49 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/modes.inl | 92 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/options.inl | 39 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/part.inl | 117 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/ratemon.inl | 85 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/region.inl | 75 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/sem.inl | 58 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/status.inl | 39 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/support.inl | 44 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/tasks.inl | 58 | ||||
-rw-r--r-- | cpukit/rtems/macros/rtems/rtems/timer.inl | 85 |
16 files changed, 1055 insertions, 0 deletions
diff --git a/cpukit/rtems/macros/rtems/rtems/asr.inl b/cpukit/rtems/macros/rtems/rtems/asr.inl new file mode 100644 index 0000000000..d6806b00f6 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/asr.inl @@ -0,0 +1,90 @@ +/* macros/asr.h + * + * This include file contains the implemenation of all routines + * associated with the asynchronous signal handler which are inlined. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __INLINE_ASR_h +#define __INLINE_ASR_h + +#include <rtems/score/isr.h> + +/*PAGE + * + * _ASR_Initialize + * + */ + +#define _ASR_Initialize( _information ) \ +{ \ + (_information)->is_enabled = TRUE; \ + (_information)->handler = NULL; \ + (_information)->mode_set = RTEMS_DEFAULT_MODES; \ + (_information)->signals_posted = 0; \ + (_information)->signals_pending = 0; \ + (_information)->nest_level = 0; \ +} + +/*PAGE + * + * _ASR_Swap_signals + * + */ + +#define _ASR_Swap_signals( _information ) \ +{ \ + rtems_signal_set _signals; \ + ISR_Level _level; \ + \ + _ISR_Disable( _level ); \ + _signals = (_information)->signals_pending; \ + (_information)->signals_pending = (_information)->signals_posted; \ + (_information)->signals_posted = _signals; \ + _ISR_Enable( _level ); \ +} + +/*PAGE + * + * _ASR_Is_null_handler + * + */ + +#define _ASR_Is_null_handler( _asr_handler ) \ + ( (_asr_handler) == NULL ) + +/*PAGE + * + * _ASR_Are_signals_pending + * + */ + +#define _ASR_Are_signals_pending( _information ) \ + ( (_information)->signals_posted != 0 ) + +/*PAGE + * + * _ASR_Post_signals + * + */ + +#define _ASR_Post_signals( _signals, _signal_set ) \ + do { \ + ISR_Level _level; \ + \ + _ISR_Disable( _level ); \ + *(_signal_set) |= (_signals); \ + _ISR_Enable( _level ); \ + } while ( 0 ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/attr.inl b/cpukit/rtems/macros/rtems/rtems/attr.inl new file mode 100644 index 0000000000..27231871ba --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/attr.inl @@ -0,0 +1,91 @@ +/* macros/attr.h + * + * This include file contains all of the inlined routines associated + * with attributes. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __MACROS_ATTRIBUTES_h +#define __MACROS_ATTRIBUTES_h + +/*PAGE + * + * _Attributes_Set + */ + +#define _Attributes_Set( _new_attributes, _attribute_set ) \ + ( (_attribute_set) | (_new_attributes) ) + +/*PAGE + * + * _Attributes_Clear + */ + +#define _Attributes_Clear( _attribute_set, _mask ) \ + ( (_attribute_set) & ~(_mask) ) + +/*PAGE + * + * _Attributes_Is_floating_point + * + */ + +#define _Attributes_Is_floating_point( _attribute_set ) \ + ( (_attribute_set) & RTEMS_FLOATING_POINT ) + +/*PAGE + * + * _Attributes_Is_global + * + */ + +#define _Attributes_Is_global( _attribute_set ) \ + ( (_attribute_set) & RTEMS_GLOBAL ) + +/*PAGE + * + * _Attributes_Is_priority + * + */ + +#define _Attributes_Is_priority( _attribute_set ) \ + ( (_attribute_set) & RTEMS_PRIORITY ) + +/*PAGE + * + * _Attributes_Is_binary_semaphore + * + */ + +#define _Attributes_Is_binary_semaphore( _attribute_set ) \ + ( (_attribute_set) & RTEMS_BINARY_SEMAPHORE ) + +/*PAGE + * + * _Attributes_Is_inherit_priority + * + */ + +#define _Attributes_Is_inherit_priority( _attribute_set ) \ + ( (_attribute_set) & RTEMS_INHERIT_PRIORITY ) + +/*PAGE + * + * _Attributes_Is_priority_ceiling + * + */ + +#define _Attributes_Is_priority_ceiling( _attribute_set ) \ + ( (_attribute_set) & RTEMS_PRIORITY_CEILING ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/dpmem.inl b/cpukit/rtems/macros/rtems/rtems/dpmem.inl new file mode 100644 index 0000000000..3e1d7bce95 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/dpmem.inl @@ -0,0 +1,59 @@ +/* macros/dpmem.h + * + * This include file contains the inline routine used in conjunction + * with the Dual Ported Memory Manager + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __MACROS_DPMEM_h +#define __MACROS_DPMEM_h + +/*PAGE + * + * _Dual_ported_memory_Allocate + * + */ + +#define _Dual_ported_memory_Allocate() \ + (Dual_ported_memory_Control *) \ + _Objects_Allocate( &_Dual_ported_memory_Information ) + +/*PAGE + * + * _Dual_ported_memory_Free + * + */ + +#define _Dual_ported_memory_Free( _the_port ) \ + _Objects_Free( &_Dual_ported_memory_Information, &(_the_port)->Object ) + +/*PAGE + * + * _Dual_ported_memory_Get + * + */ + +#define _Dual_ported_memory_Get( _id, _location ) \ + (Dual_ported_memory_Control *) \ + _Objects_Get( &_Dual_ported_memory_Information, (_id), (_location) ) + + +/*PAGE + * + * _Dual_ported_memory_Is_null + */ + +#define _Dual_ported_memory_Is_null( _the_port ) \ + ( (_the_port) == NULL ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/event.inl b/cpukit/rtems/macros/rtems/rtems/event.inl new file mode 100644 index 0000000000..e37f6813bf --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/event.inl @@ -0,0 +1,21 @@ +/* macros/event.h + * + * This include file contains the implementation of macros for + * the Event Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __MACROS_EVENT_h +#define __MACROS_EVENT_h + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/eventset.inl b/cpukit/rtems/macros/rtems/rtems/eventset.inl new file mode 100644 index 0000000000..1803d18637 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/eventset.inl @@ -0,0 +1,53 @@ +/* eventset.inl + * + * This include file contains the macro implementation of inlined + * routines in the event set object. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __EVENT_SET_inl +#define __EVENT_SET_inl + +/*PAGE + * + * _Event_sets_Is_empty + */ + +#define _Event_sets_Is_empty( _the_event_set ) \ + ((_the_event_set) == 0 ) + +/*PAGE + * + * _Event_sets_Is_empty + */ + +#define _Event_sets_Post( _the_new_events, _the_event_set ) \ + *(_the_event_set) |= (_the_new_events) + +/*PAGE + * + * _Event_sets_Is_empty + */ + +#define _Event_sets_Get( _the_event_set, _the_event_condition ) \ + ((_the_event_set) & (_the_event_condition)) + +/*PAGE + * + * _Event_sets_Clear + */ + +#define _Event_sets_Clear( _the_event_set, _the_mask ) \ + ((_the_event_set) & ~(_the_mask)) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/message.inl b/cpukit/rtems/macros/rtems/rtems/message.inl new file mode 100644 index 0000000000..62b6ac0ceb --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/message.inl @@ -0,0 +1,49 @@ +/* message.inl + * + * This include file contains the macro implementation of all + * inlined routines in the Message Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __MESSAGE_QUEUE_inl +#define __MESSAGE_QUEUE_inl + +/*PAGE + * + * _Message_queue_Is_null + * + */ + +#define _Message_queue_Is_null( _the_message_queue ) \ + ( (_the_message_queue) == NULL ) + +/*PAGE + * + * _Message_queue_Free + * + */ + +#define _Message_queue_Free( _the_message_queue ) \ + _Objects_Free( &_Message_queue_Information, &(_the_message_queue)->Object ) + +/*PAGE + * + * _Message_queue_Get + * + */ + +#define _Message_queue_Get( _id, _location ) \ + (Message_queue_Control *) \ + _Objects_Get( &_Message_queue_Information, (_id), (_location) ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/modes.inl b/cpukit/rtems/macros/rtems/rtems/modes.inl new file mode 100644 index 0000000000..a7dea6516d --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/modes.inl @@ -0,0 +1,92 @@ +/* modes.inl + * + * This include file contains the macro implementation of the + * inlined routines in the Mode Handler. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __MODES_inl +#define __MODES_inl + +/*PAGE + * + * _Modes_Mask_changed + * + */ + +#define _Modes_Mask_changed( _mode_set, _masks ) \ + ( (_mode_set) & (_masks) ) + +/*PAGE + * + * _Modes_Is_asr_disabled + * + */ + +#define _Modes_Is_asr_disabled( _mode_set ) \ + (((_mode_set) & RTEMS_ASR_MASK) == RTEMS_NO_ASR) + +/*PAGE + * + * _Modes_Is_preempt + * + */ + +#define _Modes_Is_preempt( _mode_set ) \ + ( ( (_mode_set) & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT ) + +/*PAGE + * + * _Modes_Is_timeslice + * + */ + +#define _Modes_Is_timeslice( _mode_set ) \ + (((_mode_set) & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE) + +/*PAGE + * + * _Modes_Get_interrupt_level + * + */ + +#define _Modes_Get_interrupt_level( _mode_set ) \ + ( (_mode_set) & RTEMS_INTERRUPT_MASK ) + +/*PAGE + * + * _Modes_Set_interrupt_level + * + */ + +#define _Modes_Set_interrupt_level( _mode_set ) \ + _ISR_Set_level( _Modes_Get_interrupt_level( (_mode_set) ) ) + +/*PAGE + * + * _Modes_Change + * + */ + +#define _Modes_Change( _old_mode_set, _new_mode_set, \ + _mask, _out_mode_set, _changed ) \ + { Modes_Control _out_mode; \ + \ + _out_mode = (_old_mode_set); \ + _out_mode &= ~(_mask); \ + _out_mode |= (_new_mode_set) & (_mask); \ + *(_changed) = _out_mode ^ (_old_mode_set); \ + *(_out_mode_set) = _out_mode; \ + } + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/options.inl b/cpukit/rtems/macros/rtems/rtems/options.inl new file mode 100644 index 0000000000..7c14e4fe4f --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/options.inl @@ -0,0 +1,39 @@ +/* options.inl + * + * This file contains the macro implementation of the inlined + * routines from the Options Handler. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __OPTIONS_inl +#define __OPTIONS_inl + +/*PAGE + * + * _Options_Is_no_wait + * + */ + +#define _Options_Is_no_wait( _option_set ) \ + ( (_option_set) & RTEMS_NO_WAIT ) + +/*PAGE + * + * _Options_Is_any + * + */ + +#define _Options_Is_any( _option_set ) \ + ( (_option_set) & RTEMS_EVENT_ANY ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/part.inl b/cpukit/rtems/macros/rtems/rtems/part.inl new file mode 100644 index 0000000000..55c188b210 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/part.inl @@ -0,0 +1,117 @@ +/* part.inl + * + * This file contains the macro implementation of all inlined routines + * in the Partition Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __PARTITION_inl +#define __PARTITION_inl + +/*PAGE + * + * _Partition_Allocate_buffer + * + */ + +#define _Partition_Allocate_buffer( _the_partition ) \ + _Chain_Get( &(_the_partition)->Memory ) + +/*PAGE + * + * _Partition_Free_buffer + * + */ + +#define _Partition_Free_buffer( _the_partition, _the_buffer ) \ + _Chain_Append( &(_the_partition)->Memory, (_the_buffer) ) + +/*PAGE + * + * _Partition_Is_buffer_on_boundary + * + */ + +#define _Partition_Is_buffer_on_boundary( _the_buffer, _the_partition ) \ + ((((unsigned32) _Addresses_Subtract( \ + (_the_buffer), \ + (_the_partition)->starting_address ) \ + ) % \ + (_the_partition)->buffer_size) == 0) + +/*PAGE + * + * _Partition_Is_buffer_valid + * + */ + +#define _Partition_Is_buffer_valid( _the_buffer, _the_partition ) \ + ( \ + _Addresses_Is_in_range( \ + (_the_buffer), \ + (_the_partition)->starting_address, \ + _Addresses_Add_offset( \ + (_the_partition)->starting_address, \ + (_the_partition)->length \ + ) \ + ) && \ + _Partition_Is_buffer_on_boundary( (_the_buffer), (_the_partition) ) \ + ) + +/*PAGE + * + * _Partition_Is_buffer_size_aligned + * + */ + +#define _Partition_Is_buffer_size_aligned( _buffer_size ) \ + ((_buffer_size) % CPU_PARTITION_ALIGNMENT == 0) + +/*PAGE + * + * _Partition_Allocate + * + */ + +#define _Partition_Allocate() \ + (Partition_Control *) _Objects_Allocate( &_Partition_Information ) + +/*PAGE + * + * _Partition_Free + * + */ + +#define _Partition_Free( _the_partition ) \ + _Objects_Free( &_Partition_Information, &(_the_partition)->Object ) + +/*PAGE + * + * _Partition_Get + * + */ + +#define _Partition_Get( _id, _location ) \ + (Partition_Control *) \ + _Objects_Get( &_Partition_Information, (_id), (_location) ) + +/*PAGE + * + * _Partition_Is_null + * + */ + +#define _Partition_Is_null( _the_partition ) \ + ( (_the_partition) == NULL ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/ratemon.inl b/cpukit/rtems/macros/rtems/rtems/ratemon.inl new file mode 100644 index 0000000000..ebb182e6f1 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/ratemon.inl @@ -0,0 +1,85 @@ +/* ratemon.inl + * + * This file contains the macro implementation of the inlined + * routines in the Rate Monotonic Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __RATE_MONOTONIC_inl +#define __RATE_MONOTONIC_inl + +/*PAGE + * + * _Rate_monotonic_Allocate + * + */ + +#define _Rate_monotonic_Allocate() \ + (Rate_monotonic_Control *) \ + _Objects_Allocate( &_Rate_monotonic_Information ) + +/*PAGE + * + * _Rate_monotonic_Free + * + */ + +#define _Rate_monotonic_Free( _the_period ) \ + _Objects_Free( &_Rate_monotonic_Information, &(_the_period)->Object ) + +/*PAGE + * + * _Rate_monotonic_Get + * + */ + +#define _Rate_monotonic_Get( _id, _location ) \ + (Rate_monotonic_Control *) \ + _Objects_Get( &_Rate_monotonic_Information, (_id), (_location) ) + +/*PAGE + * + * _Rate_monotonic_Is_active + * + */ + +#define _Rate_monotonic_Is_active( _the_period ) \ + ((_the_period)->state == RATE_MONOTONIC_ACTIVE) + +/*PAGE + * + * _Rate_monotonic_Is_inactive + * + */ + +#define _Rate_monotonic_Is_inactive( _the_period ) \ + ((_the_period)->state == RATE_MONOTONIC_INACTIVE) + +/*PAGE + * + * _Rate_monotonic_Is_expired + * + */ + +#define _Rate_monotonic_Is_expired( _the_period ) \ + ((_the_period)->state == RATE_MONOTONIC_EXPIRED) + +/*PAGE + * + * _Rate_monotonic_Is_null + * + */ + +#define _Rate_monotonic_Is_null( _the_period ) ( (_the_period) == NULL ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/region.inl b/cpukit/rtems/macros/rtems/rtems/region.inl new file mode 100644 index 0000000000..667d77e307 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/region.inl @@ -0,0 +1,75 @@ +/* region.inl + * + * This file contains the macro implementation of the inlined + * routines from the Region Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __REGION_inl +#define __REGION_inl + +/*PAGE + * + * _Region_Allocate + * + */ + +#define _Region_Allocate() \ + (Region_Control *) _Objects_Allocate( &_Region_Information ) + +/*PAGE + * + * _Region_Free + * + */ + +#define _Region_Free( _the_region ) \ + _Objects_Free( &_Region_Information, &(_the_region)->Object ) + +/*PAGE + * + * _Region_Get + * + */ + +#define _Region_Get( _id, _location ) \ + (Region_Control *) \ + _Objects_Get( &_Region_Information, (_id), (_location) ) + +/*PAGE + * + * _Region_Allocate_segment + * + */ + +#define _Region_Allocate_segment( _the_region, _size ) \ + _Heap_Allocate( &(_the_region)->Memory, (_size) ) + +/*PAGE + * + * _Region_Free_segment + * + */ + +#define _Region_Free_segment( _the_region, _the_segment ) \ + _Heap_Free( &(_the_region)->Memory, (_the_segment) ) + +/*PAGE + * + * _Region_Is_null + * + */ + +#define _Region_Is_null( _the_region ) ( (_the_region) == NULL ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/sem.inl b/cpukit/rtems/macros/rtems/rtems/sem.inl new file mode 100644 index 0000000000..7e94069009 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/sem.inl @@ -0,0 +1,58 @@ +/* sem.inl + * + * This file contains the macro implementation of the inlined + * routines from the Semaphore Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __SEMAPHORE_inl +#define __SEMAPHORE_inl + +/*PAGE + * + * _Semaphore_Allocate + * + */ + +#define _Semaphore_Allocate() \ + (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ) + +/*PAGE + * + * _Semaphore_Free + * + */ + +#define _Semaphore_Free( _the_semaphore ) \ + _Objects_Free( &_Semaphore_Information, &(_the_semaphore)->Object ) + +/*PAGE + * + * _Semaphore_Get + * + */ + +#define _Semaphore_Get( _id, _location ) \ + (Semaphore_Control *) \ + _Objects_Get( &_Semaphore_Information, (_id), (_location) ) + +/*PAGE + * + * _Semaphore_Is_null + * + */ + +#define _Semaphore_Is_null( _the_semaphore ) \ + ( (_the_semaphore) == NULL ) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/status.inl b/cpukit/rtems/macros/rtems/rtems/status.inl new file mode 100644 index 0000000000..408cb816d1 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/status.inl @@ -0,0 +1,39 @@ +/* macros/status.h + * + * This include file contains the implementations of the inlined + * routines for the status package. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __MACROS_STATUS_h +#define __MACROS_STATUS_h + +/*PAGE + * + * rtems_is_status_successful + * + */ + +#define rtems_is_status_successful( _code ) \ + ( (_code) == RTEMS_SUCCESSFUL ) + +/*PAGE + * + * rtems_are_statuses_equal + * + */ + +#define rtems_are_statuses_equal( _code1, _code2 ) \ + ((_code1) == (_code2)) + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/support.inl b/cpukit/rtems/macros/rtems/rtems/support.inl new file mode 100644 index 0000000000..a25b445aff --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/support.inl @@ -0,0 +1,44 @@ +/* support.inl + * + * This include file contains the macros implementation of all + * of the inlined routines specific to the RTEMS API. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __RTEMS_SUPPORT_inl +#define __RTEMS_SUPPORT_inl + +/*PAGE + * + * rtems_is_name_valid + * + */ + +#define rtems_is_name_valid( _name ) \ + ( (_name) != 0 ) + +/*PAGE + * + * rtems_name_to_characters + * + */ + +#define rtems_name_to_characters( _name, _c1, _c2, _c3, _c4 ) \ + { \ + (*(_c1) = ((_name) >> 24) & 0xff; \ + (*(_c2) = ((_name) >> 16) & 0xff; \ + (*(_c3) = ((_name) >> 8) & 0xff; \ + (*(_c4) = ((_name)) & 0xff; \ + } + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/tasks.inl b/cpukit/rtems/macros/rtems/rtems/tasks.inl new file mode 100644 index 0000000000..8dd6ff351b --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/tasks.inl @@ -0,0 +1,58 @@ +/* tasks.inl + * + * This file contains the macro implementation of all inlined + * routines in the with RTEMS Tasks Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __RTEMS_TASKS_inl +#define __RTEMS_TASKS_inl + +/*PAGE + * + * _RTEMS_tasks_Allocate + * + */ + +#define _RTEMS_tasks_Allocate() \ + (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ) + +/*PAGE + * + * _RTEMS_tasks_Free + * + */ + +#define _RTEMS_tasks_Free( _the_task ) \ + _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object ) + +/*PAGE + * + * _RTEMS_tasks_Priority_to_Core + */ + +#define _RTEMS_tasks_Priority_to_Core( _priority ) \ + ((Priority_Control) (_priority)) + +/*PAGE + * + * _RTEMS_tasks_Priority_is_valid + * + */ + +#define _RTEMS_tasks_Priority_is_valid( _the_priority ) \ + ( ((_the_priority) >= RTEMS_MINIMUM_PRIORITY) && \ + ((_the_priority) <= RTEMS_MAXIMUM_PRIORITY) ) + + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/timer.inl b/cpukit/rtems/macros/rtems/rtems/timer.inl new file mode 100644 index 0000000000..9026bed570 --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/timer.inl @@ -0,0 +1,85 @@ +/* timer.inl + * + * This file contains the macro implementation of the inlined routines + * from the Timer Manager. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __TIMER_inl +#define __TIMER_inl + +/*PAGE + * + * _Timer_Allocate + * + */ + +#define _Timer_Allocate() \ + (Timer_Control *) _Objects_Allocate( &_Timer_Information ) + +/*PAGE + * + * _Timer_Free + * + */ + +#define _Timer_Free( _the_timer ) \ + _Objects_Free( &_Timer_Information, &(_the_timer)->Object ) + +/*PAGE + * + * _Timer_Get + * + */ + +#define _Timer_Get( _id, _location ) \ + (Timer_Control *) \ + _Objects_Get( &_Timer_Information, (_id), (_location) ) + +/*PAGE + * + * _Timer_Is_interval_class + * + */ + +#define _Timer_Is_interval_class( _the_class ) \ + ( (_the_class) == TIMER_INTERVAL ) + +/*PAGE + * + * _Timer_Is_time_of_day_class + * + */ + +#define _Timer_Is_time_of_day_class( _the_class ) \ + ( (_the_class) == TIMER_TIME_OF_DAY ) + +/*PAGE + * + * _Timer_Is_dormant_class + * + */ + +#define _Timer_Is_dormant_class( _the_class ) \ + ( (_the_class) == TIMER_DORMANT ) + +/*PAGE + * + * _Timer_Is_null + * + */ + +#define _Timer_Is_null( _the_timer ) \ + ( (_the_timer) == NULL ) + +#endif +/* end of include file */ |