summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/macros
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-05-11 17:39:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-05-11 17:39:37 +0000
commitac7d5ef06a6d6e8d84abbd1f0b82162725f98326 (patch)
tree9304cf759a73f2a1c6fd3191948f00e870af3787 /cpukit/rtems/macros
downloadrtems-ac7d5ef06a6d6e8d84abbd1f0b82162725f98326.tar.bz2
Initial revision
Diffstat (limited to 'cpukit/rtems/macros')
-rw-r--r--cpukit/rtems/macros/rtems/rtems/asr.inl89
-rw-r--r--cpukit/rtems/macros/rtems/rtems/attr.inl91
-rw-r--r--cpukit/rtems/macros/rtems/rtems/dpmem.inl59
-rw-r--r--cpukit/rtems/macros/rtems/rtems/event.inl28
-rw-r--r--cpukit/rtems/macros/rtems/rtems/eventset.inl53
-rw-r--r--cpukit/rtems/macros/rtems/rtems/message.inl118
-rw-r--r--cpukit/rtems/macros/rtems/rtems/modes.inl101
-rw-r--r--cpukit/rtems/macros/rtems/rtems/options.inl39
-rw-r--r--cpukit/rtems/macros/rtems/rtems/part.inl117
-rw-r--r--cpukit/rtems/macros/rtems/rtems/ratemon.inl85
-rw-r--r--cpukit/rtems/macros/rtems/rtems/region.inl75
-rw-r--r--cpukit/rtems/macros/rtems/rtems/sem.inl58
-rw-r--r--cpukit/rtems/macros/rtems/rtems/status.inl47
-rw-r--r--cpukit/rtems/macros/rtems/rtems/tasks.inl82
-rw-r--r--cpukit/rtems/macros/rtems/rtems/timer.inl85
15 files changed, 1127 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..421755879b
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/asr.inl
@@ -0,0 +1,89 @@
+/* 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/isr.h>
+
+/*PAGE
+ *
+ * _ASR_Initialize
+ *
+ */
+
+#define _ASR_Initialize( _information ) \
+{ \
+ (_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..602622ca35
--- /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_limit
+ *
+ */
+
+#define _Attributes_Is_limit( _attribute_set ) \
+ ( (_attribute_set) & RTEMS_LIMIT )
+
+/*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 )
+
+#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..1d4cb78237
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/event.inl
@@ -0,0 +1,28 @@
+/* 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
+
+/*
+ * Event_Manager_initialization
+ */
+
+#define _Event_Manager_initialization() \
+ _Event_Sync = FALSE
+
+#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..5415708ac5
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/message.inl
@@ -0,0 +1,118 @@
+/* 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_Copy_buffer
+ */
+
+#define _Message_queue_Copy_buffer( _source, _destination ) \
+ *(Message_queue_Buffer *)(_destination) = \
+ *(Message_queue_Buffer *)(_source)
+
+/*PAGE
+ *
+ * _Message_queue_Allocate_message_buffer
+ *
+ */
+
+#define _Message_queue_Allocate_message_buffer() \
+ (Message_queue_Buffer_control *) \
+ _Chain_Get( &_Message_queue_Inactive_messages )
+
+/*PAGE
+ *
+ * _Message_queue_Free_message_buffer
+ *
+ */
+
+#define _Message_queue_Free_message_buffer( _the_message ) \
+ _Chain_Append( &_Message_queue_Inactive_messages, &(_the_message)->Node )
+
+/*PAGE
+ *
+ * _Message_queue_Get_pending_message
+ *
+ */
+
+#define _Message_queue_Get_pending_message( _the_message_queue ) \
+ (Message_queue_Buffer_control *) \
+ _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages )
+
+/*PAGE
+ *
+ * _Message_queue_Append
+ *
+ */
+
+#define _Message_queue_Append( _the_message_queue, _the_message ) \
+ _Chain_Append( &(_the_message_queue)->Pending_messages, \
+ &(_the_message)->Node )
+
+/*PAGE
+ *
+ * _Message_queue_Prepend
+ *
+ */
+
+#define _Message_queue_Prepend( _the_message_queue, _the_message ) \
+ _Chain_Prepend( &(_the_message_queue)->Pending_messages, \
+ &(_the_message)->Node )
+
+/*PAGE
+ *
+ * _Message_queue_Is_null
+ *
+ */
+
+#define _Message_queue_Is_null( _the_message_queue ) \
+ ( (_the_message_queue) == NULL )
+
+/*PAGE
+ *
+ * _Message_queue_Allocate
+ *
+ */
+
+#define _Message_queue_Allocate() \
+ (Message_queue_Control *) \
+ _Objects_Allocate( &_Message_queue_Information )
+
+/*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..f8ac061dce
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/modes.inl
@@ -0,0 +1,101 @@
+/* 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
+ *
+ * RTEMS_INTERRUPT_LEVEL
+ */
+
+#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
+ ( (_mode_set) & RTEMS_INTERRUPT_MASK )
+
+/*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 )
+
+/*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_PREEMPT_MASK)) == \
+ (RTEMS_TIMESLICE|RTEMS_PREEMPT) )
+
+/*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 ) \
+ { rtems_mode _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..c4f8a523df
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/status.inl
@@ -0,0 +1,47 @@
+/* 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))
+
+/*
+ * _Status_Is_proxy_blocking
+ *
+ */
+
+#define _Status_Is_proxy_blocking( _code ) \
+ ( (_code) == RTEMS_PROXY_BLOCKING )
+
+#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..7b40cbf7fd
--- /dev/null
+++ b/cpukit/rtems/macros/rtems/rtems/tasks.inl
@@ -0,0 +1,82 @@
+/* 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( &_Thread_Information )
+
+/*PAGE
+ *
+ * _RTEMS_tasks_Free
+ *
+ */
+
+#define _RTEMS_tasks_Free( _the_task ) \
+ _Objects_Free( &_Thread_Information, &(_the_task)->Object )
+
+/*PAGE
+ *
+ * _RTEMS_tasks_Cancel_wait
+ *
+ */
+
+#define _RTEMS_tasks_Cancel_wait( _the_thread ) \
+ { \
+ States_Control _state; \
+ States_Control _remote_state; \
+ \
+ _state = (_the_thread)->current_state; \
+ \
+ if ( _States_Is_waiting_on_thread_queue( _state ) ) { \
+ if ( _States_Is_waiting_for_rpc_reply( _state ) && \
+ _States_Is_locally_blocked( _state ) ) { \
+ _remote_state = _States_Clear( \
+ STATES_WAITING_FOR_RPC_REPLY + STATES_TRANSIENT, \
+ _state \
+ ); \
+ \
+ switch ( _remote_state ) { \
+ \
+ case STATES_WAITING_FOR_BUFFER: \
+ _Partition_MP_Send_extract_proxy( (_the_thread) ); \
+ break; \
+ case STATES_WAITING_FOR_SEGMENT: \
+ _Region_MP_Send_extract_proxy( (_the_thread) ); \
+ break; \
+ case STATES_WAITING_FOR_SEMAPHORE: \
+ _Semaphore_MP_Send_extract_proxy( (_the_thread) ); \
+ break; \
+ case STATES_WAITING_FOR_MESSAGE: \
+ _Message_queue_MP_Send_extract_proxy( (_the_thread) ); \
+ break; \
+ } \
+ } \
+ _Thread_queue_Extract( (_the_thread)->Wait.queue, (_the_thread) ); \
+ } \
+ else if ( _Watchdog_Is_active( &(_the_thread)->Timer ) ) \
+ (void) _Watchdog_Remove( &(_the_thread)->Timer ); \
+ }
+
+#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 */