summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
commit3a4ae6c210bcc37754767966f1128ae23c77b6af (patch)
tree8804983e5b92bec788d548df13db7513118d351d /cpukit/rtems/include/rtems
parentnew file -- split from inlines (diff)
downloadrtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests modified to use this. All gvar.h and conftbl.h files removed from test directories. Configuration parameter maximum_devices added. Core semaphore and mutex handlers added and RTEMS API Semaphore Manager updated to reflect this. Initialization sequence changed to invoke API specific initialization routines. Initialization tasks table now owned by RTEMS Tasks Manager. Added user extension for post-switch. Utilized user extensions to implement API specific functionality like signal dispatching. Added extensions to the System Initialization Thread so that an API can register a function to be invoked while the system is being initialized. These are largely equivalent to the pre-driver and post-driver hooks. Added the Modules file oar-go32_p5, modified oar-go32, and modified the file make/custom/go32.cfg to look at an environment varable which determines what CPU model is being used. All BSPs updated to reflect named devices and clock driver's IOCTL used by the Shared Memory Driver. Also merged clock isr into main file and removed ckisr.c where possible. Updated spsize to reflect new and moved variables. Makefiles for the executive source and include files updated to show break down of files into Core, RTEMS API, and Neither. Header and inline files installed into subdirectory based on whether logically in the Core or a part of the RTEMS API.
Diffstat (limited to 'cpukit/rtems/include/rtems')
-rw-r--r--cpukit/rtems/include/rtems/rtems/asr.h5
-rw-r--r--cpukit/rtems/include/rtems/rtems/attr.h19
-rw-r--r--cpukit/rtems/include/rtems/rtems/clock.h3
-rw-r--r--cpukit/rtems/include/rtems/rtems/dpmem.h5
-rw-r--r--cpukit/rtems/include/rtems/rtems/event.h22
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventmp.h10
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventset.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/intr.h23
-rw-r--r--cpukit/rtems/include/rtems/rtems/message.h13
-rw-r--r--cpukit/rtems/include/rtems/rtems/modes.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/mp.h14
-rw-r--r--cpukit/rtems/include/rtems/rtems/msgmp.h14
-rw-r--r--cpukit/rtems/include/rtems/rtems/options.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/part.h12
-rw-r--r--cpukit/rtems/include/rtems/rtems/partmp.h11
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h15
-rw-r--r--cpukit/rtems/include/rtems/rtems/region.h17
-rw-r--r--cpukit/rtems/include/rtems/rtems/regionmp.h15
-rw-r--r--cpukit/rtems/include/rtems/rtems/rtemsapi.h34
-rw-r--r--cpukit/rtems/include/rtems/rtems/sem.h109
-rw-r--r--cpukit/rtems/include/rtems/rtems/semmp.h16
-rw-r--r--cpukit/rtems/include/rtems/rtems/signal.h22
-rw-r--r--cpukit/rtems/include/rtems/rtems/signalmp.h10
-rw-r--r--cpukit/rtems/include/rtems/rtems/status.h28
-rw-r--r--cpukit/rtems/include/rtems/rtems/support.h49
-rw-r--r--cpukit/rtems/include/rtems/rtems/taskmp.h12
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h170
-rw-r--r--cpukit/rtems/include/rtems/rtems/timer.h36
-rw-r--r--cpukit/rtems/include/rtems/rtems/types.h31
29 files changed, 519 insertions, 204 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/asr.h b/cpukit/rtems/include/rtems/rtems/asr.h
index b2147f8df4..55eed78ec2 100644
--- a/cpukit/rtems/include/rtems/rtems/asr.h
+++ b/cpukit/rtems/include/rtems/rtems/asr.h
@@ -22,7 +22,7 @@
extern "C" {
#endif
-#include <rtems/modes.h>
+#include <rtems/rtems/modes.h>
/*
*
@@ -54,6 +54,7 @@ typedef rtems_asr ( *rtems_asr_entry )(
*/
typedef struct {
+ boolean is_enabled; /* are ASRs enabled currently? */
rtems_asr_entry handler; /* address of RTEMS_ASR */
Modes_Control mode_set; /* RTEMS_ASR mode */
rtems_signal_set signals_posted; /* signal set */
@@ -167,7 +168,7 @@ STATIC INLINE void _ASR_Post_signals(
rtems_signal_set *signal_set
);
-#include <rtems/asr.inl>
+#include <rtems/rtems/asr.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/attr.h b/cpukit/rtems/include/rtems/rtems/attr.h
index 950d77f73d..2d34dfe380 100644
--- a/cpukit/rtems/include/rtems/rtems/attr.h
+++ b/cpukit/rtems/include/rtems/rtems/attr.h
@@ -44,6 +44,9 @@ typedef unsigned32 rtems_attribute;
#define RTEMS_NO_INHERIT_PRIORITY 0x00000000
#define RTEMS_INHERIT_PRIORITY 0x00000020
+#define RTEMS_NO_PRIORITY_CEILING 0x00000000
+#define RTEMS_PRIORITY_CEILING 0x00000040
+
#if ( CPU_HARDWARE_FP == TRUE )
#define ATTRIBUTES_NOT_SUPPORTED 0
#else
@@ -177,7 +180,21 @@ STATIC INLINE boolean _Attributes_Is_inherit_priority(
rtems_attribute attribute_set
);
-#include <rtems/attr.inl>
+/*
+ * _Attributes_Is_priority_ceiling
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the priority ceiling attribute
+ * is enabled in the attribute_set and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _Attributes_Is_priority_ceiling(
+ rtems_attribute attribute_set
+);
+
+
+#include <rtems/rtems/attr.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h
index e849ab4f40..595dfcdbaf 100644
--- a/cpukit/rtems/include/rtems/rtems/clock.h
+++ b/cpukit/rtems/include/rtems/rtems/clock.h
@@ -29,7 +29,8 @@
extern "C" {
#endif
-#include <rtems/tod.h>
+#include <rtems/core/tod.h>
+#include <rtems/rtems/types.h>
/*
* List of things which can be returned by the rtems_clock_get directive.
diff --git a/cpukit/rtems/include/rtems/rtems/dpmem.h b/cpukit/rtems/include/rtems/rtems/dpmem.h
index 2b6016a842..801d5f3864 100644
--- a/cpukit/rtems/include/rtems/rtems/dpmem.h
+++ b/cpukit/rtems/include/rtems/rtems/dpmem.h
@@ -32,8 +32,7 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/object.h>
+#include <rtems/core/object.h>
/*
* The following structure defines the port control block. Each port
@@ -201,7 +200,7 @@ STATIC INLINE boolean _Dual_ported_memory_Is_null(
Dual_ported_memory_Control *the_port
);
-#include <rtems/dpmem.inl>
+#include <rtems/rtems/dpmem.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
index aeb71b2abd..05020b9926 100644
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ b/cpukit/rtems/include/rtems/rtems/event.h
@@ -28,11 +28,12 @@
extern "C" {
#endif
-#include <rtems/object.h>
-#include <rtems/options.h>
-#include <rtems/thread.h>
-#include <rtems/watchdog.h>
-#include <rtems/eventset.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/types.h>
+#include <rtems/rtems/options.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/watchdog.h>
+#include <rtems/rtems/eventset.h>
/*
* This constant is passed as the event_in to the
@@ -104,9 +105,10 @@ rtems_status_code rtems_event_receive (
*/
void _Event_Seize (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks
+ rtems_event_set event_in,
+ rtems_option option_set,
+ rtems_interval ticks,
+ rtems_event_set *event_out
);
/*
@@ -147,8 +149,8 @@ void _Event_Timeout (
EXTERN boolean _Event_Sync; /* event manager sync flag */
-#include <rtems/event.inl>
-#include <rtems/eventmp.h>
+#include <rtems/rtems/eventmp.h>
+#include <rtems/rtems/event.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/eventmp.h b/cpukit/rtems/include/rtems/rtems/eventmp.h
index 4b42cf791e..86587adc4a 100644
--- a/cpukit/rtems/include/rtems/rtems/eventmp.h
+++ b/cpukit/rtems/include/rtems/rtems/eventmp.h
@@ -21,11 +21,11 @@
extern "C" {
#endif
-#include <rtems/event.h>
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/thread.h>
-#include <rtems/watchdog.h>
+#include <rtems/rtems/event.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/watchdog.h>
/*
* The following enumerated type defines the list of
diff --git a/cpukit/rtems/include/rtems/rtems/eventset.h b/cpukit/rtems/include/rtems/rtems/eventset.h
index a25dabe58b..770f607075 100644
--- a/cpukit/rtems/include/rtems/rtems/eventset.h
+++ b/cpukit/rtems/include/rtems/rtems/eventset.h
@@ -132,7 +132,7 @@ STATIC INLINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_mask
);
-#include <rtems/eventset.inl>
+#include <rtems/rtems/eventset.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/intr.h b/cpukit/rtems/include/rtems/rtems/intr.h
index 3669af1ccc..08c249d085 100644
--- a/cpukit/rtems/include/rtems/rtems/intr.h
+++ b/cpukit/rtems/include/rtems/rtems/intr.h
@@ -21,7 +21,7 @@
extern "C" {
#endif
-#include <rtems/isr.h>
+#include <rtems/core/isr.h>
/*
* Interrupt level type
@@ -30,6 +30,27 @@ extern "C" {
typedef ISR_Level rtems_interrupt_level;
/*
+ * The following type defines the control block used to manage
+ * the vectors.
+ */
+
+typedef ISR_Vector_number rtems_vector_number;
+
+/*
+ * Return type for ISR Handler
+ */
+
+typedef void rtems_isr;
+
+/*
+ * Pointer to an ISR Handler
+ */
+
+typedef rtems_isr ( *rtems_isr_entry )(
+ rtems_vector_number
+ );
+
+/*
* _Interrupt_Manager_initialization
*
* DESCRIPTION:
diff --git a/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h
index 25188044be..2ee910ac05 100644
--- a/cpukit/rtems/include/rtems/rtems/message.h
+++ b/cpukit/rtems/include/rtems/rtems/message.h
@@ -34,10 +34,11 @@
extern "C" {
#endif
-#include <rtems/types.h>
-#include <rtems/chain.h>
-#include <rtems/object.h>
-#include <rtems/threadq.h>
+#include <rtems/rtems/types.h>
+#include <rtems/core/chain.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/attr.h>
+#include <rtems/core/threadq.h>
/*
* The following defines the data types needed to manipulate
@@ -468,8 +469,8 @@ STATIC INLINE Message_queue_Control *_Message_queue_Get (
Objects_Locations *location
);
-#include <rtems/message.inl>
-#include <rtems/msgmp.h>
+#include <rtems/rtems/message.inl>
+#include <rtems/rtems/msgmp.h>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/modes.h b/cpukit/rtems/include/rtems/rtems/modes.h
index b3b05b3f85..115898e503 100644
--- a/cpukit/rtems/include/rtems/rtems/modes.h
+++ b/cpukit/rtems/include/rtems/rtems/modes.h
@@ -21,7 +21,7 @@
extern "C" {
#endif
-#include <rtems/isr.h>
+#include <rtems/core/isr.h>
/*
* The following type defines the control block used to manage
@@ -173,7 +173,7 @@ STATIC INLINE void _Modes_Change (
Modes_Control *changed
);
-#include <rtems/modes.inl>
+#include <rtems/rtems/modes.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/mp.h b/cpukit/rtems/include/rtems/rtems/mp.h
index 96147d3b44..079f55b093 100644
--- a/cpukit/rtems/include/rtems/rtems/mp.h
+++ b/cpukit/rtems/include/rtems/rtems/mp.h
@@ -45,20 +45,6 @@ void _Multiprocessing_Manager_initialization ( void );
void rtems_multiprocessing_announce ( void );
-/*
- *
- * _Multiprocessing_Receive_server
- *
- * DESCRIPTION:
- *
- * This routine is a server thread which processes remote requests
- * from other nodes.
- */
-
-Thread _Multiprocessing_Receive_server (
- Thread_Argument ignored
-);
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/rtems/include/rtems/rtems/msgmp.h b/cpukit/rtems/include/rtems/rtems/msgmp.h
index ff84e83ed3..592328678b 100644
--- a/cpukit/rtems/include/rtems/rtems/msgmp.h
+++ b/cpukit/rtems/include/rtems/rtems/msgmp.h
@@ -21,12 +21,12 @@
extern "C" {
#endif
-#include <rtems/message.h>
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/options.h>
-#include <rtems/thread.h>
-#include <rtems/watchdog.h>
+#include <rtems/rtems/message.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/options.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/watchdog.h>
/*
* The following enumerated type defines the list of
@@ -97,7 +97,7 @@ rtems_status_code _Message_queue_MP_Send_request_packet (
void *buffer,
unsigned32 *size_p,
rtems_option option_set,
- rtems_interval timeout
+ Watchdog_Interval timeout
);
/*
diff --git a/cpukit/rtems/include/rtems/rtems/options.h b/cpukit/rtems/include/rtems/rtems/options.h
index b318aad8c9..d8da2f9e86 100644
--- a/cpukit/rtems/include/rtems/rtems/options.h
+++ b/cpukit/rtems/include/rtems/rtems/options.h
@@ -69,7 +69,7 @@ STATIC INLINE boolean _Options_Is_any (
rtems_option option_set
);
-#include <rtems/options.inl>
+#include <rtems/rtems/options.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/part.h b/cpukit/rtems/include/rtems/rtems/part.h
index 230cf029f7..da163c6beb 100644
--- a/cpukit/rtems/include/rtems/rtems/part.h
+++ b/cpukit/rtems/include/rtems/rtems/part.h
@@ -31,10 +31,10 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/address.h>
-#include <rtems/attr.h>
-#include <rtems/object.h>
+#include <rtems/core/address.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/attr.h>
+#include <rtems/rtems/types.h>
/*
* The following defines the control block used to manage each partition.
@@ -280,8 +280,8 @@ STATIC INLINE boolean _Partition_Is_null (
Partition_Control *the_partition
);
-#include <rtems/part.inl>
-#include <rtems/partmp.h>
+#include <rtems/rtems/part.inl>
+#include <rtems/rtems/partmp.h>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/partmp.h b/cpukit/rtems/include/rtems/rtems/partmp.h
index 4b3bf876ff..980eaea853 100644
--- a/cpukit/rtems/include/rtems/rtems/partmp.h
+++ b/cpukit/rtems/include/rtems/rtems/partmp.h
@@ -21,11 +21,12 @@
extern "C" {
#endif
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/options.h>
-#include <rtems/part.h>
-#include <rtems/thread.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/options.h>
+#include <rtems/core/thread.h>
+
+#include <rtems/rtems/part.h>
/*
* The following enumerated type defines the list of
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 75a9963888..6b401ba5b0 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -29,10 +29,9 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/object.h>
-#include <rtems/thread.h>
-#include <rtems/watchdog.h>
+#include <rtems/core/object.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/watchdog.h>
/*
* The following enumerated type defines the states in which a
@@ -50,7 +49,7 @@ typedef enum {
* directive to obtain status information.
*/
-#define RTEMS_PERIOD_STATUS RTEMS_NO_TIMEOUT
+#define RTEMS_PERIOD_STATUS WATCHDOG_NO_TIMEOUT
/*
* The following structure defines the control block used to manage
@@ -148,8 +147,8 @@ rtems_status_code rtems_rate_monotonic_delete(
*/
rtems_status_code rtems_rate_monotonic_period(
- Objects_Id id,
- rtems_interval length
+ Objects_Id id,
+ rtems_interval length
);
/*
@@ -276,7 +275,7 @@ STATIC INLINE boolean _Rate_monotonic_Is_null (
Rate_monotonic_Control *the_period
);
-#include <rtems/ratemon.inl>
+#include <rtems/rtems/ratemon.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h
index a5f6aa761c..077d2b76e7 100644
--- a/cpukit/rtems/include/rtems/rtems/region.h
+++ b/cpukit/rtems/include/rtems/rtems/region.h
@@ -30,11 +30,12 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/object.h>
-#include <rtems/threadq.h>
-#include <rtems/heap.h>
+#include <rtems/core/object.h>
+#include <rtems/core/threadq.h>
+#include <rtems/core/heap.h>
#include <rtems/debug.h>
+#include <rtems/rtems/attr.h>
+#include <rtems/rtems/types.h>
/*
* The following records define the control block used to manage
@@ -158,8 +159,8 @@ rtems_status_code rtems_region_delete(
rtems_status_code rtems_region_get_segment(
Objects_Id id,
unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout,
+ rtems_option option_set,
+ rtems_interval timeout,
void **segment
);
@@ -278,8 +279,8 @@ STATIC INLINE boolean _Region_Is_null (
Region_Control *the_region
);
-#include <rtems/region.inl>
-#include <rtems/regionmp.h>
+#include <rtems/rtems/region.inl>
+#include <rtems/rtems/regionmp.h>
/*
* _Region_Debug_Walk
diff --git a/cpukit/rtems/include/rtems/rtems/regionmp.h b/cpukit/rtems/include/rtems/rtems/regionmp.h
index 9756103a60..91ac5227f2 100644
--- a/cpukit/rtems/include/rtems/rtems/regionmp.h
+++ b/cpukit/rtems/include/rtems/rtems/regionmp.h
@@ -21,11 +21,12 @@
extern "C" {
#endif
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/options.h>
-#include <rtems/region.h>
-#include <rtems/thread.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/core/thread.h>
+
+#include <rtems/rtems/options.h>
+#include <rtems/rtems/region.h>
/*
* The following enumerated type defines the list of
@@ -87,8 +88,8 @@ rtems_status_code _Region_MP_Send_request_packet (
Objects_Id region_id,
void *segment,
unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout
+ rtems_option option_set,
+ rtems_interval timeout
);
/*
diff --git a/cpukit/rtems/include/rtems/rtems/rtemsapi.h b/cpukit/rtems/include/rtems/rtems/rtemsapi.h
new file mode 100644
index 0000000000..e43de773fd
--- /dev/null
+++ b/cpukit/rtems/include/rtems/rtems/rtemsapi.h
@@ -0,0 +1,34 @@
+/*
+ * RTEMS API Support
+ *
+ * NOTE:
+ *
+ * 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_API_h
+#define __RTEMS_API_h
+
+#include <rtems/config.h>
+
+/*PAGE
+ *
+ * _RTEMS_API_Initialize
+ *
+ * XXX
+ */
+
+void _RTEMS_API_Initialize(
+ rtems_configuration_table *configuration_table
+);
+
+#endif
+/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
index ff8abbc773..1faf3b13e9 100644
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ b/cpukit/rtems/include/rtems/rtems/sem.h
@@ -31,23 +31,26 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/attr.h>
-#include <rtems/object.h>
-#include <rtems/threadq.h>
+#include <rtems/rtems/types.h>
+#include <rtems/rtems/support.h>
+#include <rtems/rtems/tasks.h>
+#include <rtems/rtems/attr.h>
+#include <rtems/core/coremutex.h>
+#include <rtems/core/object.h>
+#include <rtems/core/coresem.h>
+#include <rtems/core/threadq.h>
/*
* The following defines the control block used to manage each semaphore.
*/
typedef struct {
- Objects_Control Object;
- Thread_queue_Control Wait_queue;
- rtems_attribute attribute_set;
- unsigned32 count;
- unsigned32 nest_count;
- Thread_Control *holder;
- Objects_Id holder_id;
+ Objects_Control Object;
+ rtems_attribute attribute_set;
+ union {
+ CORE_mutex_Control mutex;
+ CORE_semaphore_Control semaphore;
+ } Core_control;
} Semaphore_Control;
/*
@@ -82,11 +85,11 @@ void _Semaphore_Manager_initialization(
*/
rtems_status_code rtems_semaphore_create(
- rtems_name name,
- unsigned32 count,
- rtems_attribute attribute_set,
- rtems_task_priority priority_ceiling,
- Objects_Id *id
+ rtems_name name,
+ unsigned32 count,
+ rtems_attribute attribute_set,
+ rtems_task_priority priority_ceiling,
+ rtems_id *id
);
/*
@@ -106,7 +109,7 @@ rtems_status_code rtems_semaphore_create(
rtems_status_code rtems_semaphore_ident(
rtems_name name,
unsigned32 node,
- Objects_Id *id
+ rtems_id *id
);
/*
@@ -119,7 +122,7 @@ rtems_status_code rtems_semaphore_ident(
*/
rtems_status_code rtems_semaphore_delete(
- Objects_Id id
+ rtems_id id
);
/*
@@ -137,8 +140,8 @@ rtems_status_code rtems_semaphore_delete(
*/
rtems_status_code rtems_semaphore_obtain(
- Objects_Id id,
- unsigned32 option_set,
+ rtems_id id,
+ unsigned32 option_set,
rtems_interval timeout
);
@@ -155,7 +158,7 @@ rtems_status_code rtems_semaphore_obtain(
*/
rtems_status_code rtems_semaphore_release(
- Objects_Id id
+ rtems_id id
);
/*
@@ -213,7 +216,7 @@ STATIC INLINE void _Semaphore_Free (
*/
STATIC INLINE Semaphore_Control *_Semaphore_Get (
- Objects_Id id,
+ rtems_id id,
Objects_Locations *location
);
@@ -229,8 +232,66 @@ STATIC INLINE boolean _Semaphore_Is_null (
Semaphore_Control *the_semaphore
);
-#include <rtems/sem.inl>
-#include <rtems/semmp.h>
+/*
+ * _Semaphore_Translate_core_mutex_return_code
+ *
+ * DESCRIPTION:
+ *
+ * This function returns a RTEMS status code based on the mutex
+ * status code specified.
+ */
+
+rtems_status_code _Semaphore_Translate_core_mutex_return_code (
+ unsigned32 the_mutex_status
+);
+
+/*
+ * _Semaphore_Translate_core_semaphore_return_code
+ *
+ * DESCRIPTION:
+ *
+ * This function returns a RTEMS status code based on the semaphore
+ * status code specified.
+ */
+
+rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
+ unsigned32 the_mutex_status
+);
+
+/*PAGE
+ *
+ * _Semaphore_Core_mutex_mp_support
+ *
+ * DESCRIPTION:
+ *
+ * This function processes the global actions necessary for remote
+ * accesses to a global semaphore based on a core mutex. This function
+ * is called by the core.
+ */
+
+void _Semaphore_Core_mutex_mp_support (
+ Thread_Control *the_thread,
+ rtems_id id
+);
+
+/*PAGE
+ *
+ * _Semaphore_Core_mp_support
+ *
+ * DESCRIPTION:
+ *
+ * This function processes the global actions necessary for remote
+ * accesses to a global semaphore based on a core semaphore. This function
+ * is called by the core.
+ */
+
+void _Semaphore_Core_semaphore_mp_support (
+ Thread_Control *the_thread,
+ rtems_id id
+);
+
+#include <rtems/rtems/sem.inl>
+#include <rtems/rtems/semmp.h>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h
index 915e18164c..a796f6ad6b 100644
--- a/cpukit/rtems/include/rtems/rtems/semmp.h
+++ b/cpukit/rtems/include/rtems/rtems/semmp.h
@@ -21,12 +21,12 @@
extern "C" {
#endif
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/options.h>
-#include <rtems/sem.h>
-#include <rtems/thread.h>
-#include <rtems/watchdog.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/options.h>
+#include <rtems/rtems/sem.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/watchdog.h>
/*
* The following enumerated type defines the list of
@@ -84,8 +84,8 @@ void _Semaphore_MP_Send_process_packet (
rtems_status_code _Semaphore_MP_Send_request_packet (
Semaphore_MP_Remote_operations operation,
Objects_Id semaphore_id,
- rtems_option option_set,
- rtems_interval timeout
+ rtems_option option_set,
+ rtems_interval timeout
);
/*
diff --git a/cpukit/rtems/include/rtems/rtems/signal.h b/cpukit/rtems/include/rtems/rtems/signal.h
index 74ff4a57fb..3dcb84513b 100644
--- a/cpukit/rtems/include/rtems/rtems/signal.h
+++ b/cpukit/rtems/include/rtems/rtems/signal.h
@@ -27,11 +27,21 @@
extern "C" {
#endif
-#include <rtems/asr.h>
-#include <rtems/modes.h>
-#include <rtems/object.h>
-#include <rtems/status.h>
-#include <rtems/types.h>
+#include <rtems/rtems/asr.h>
+#include <rtems/rtems/modes.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/types.h>
+
+/*
+ * _Signal_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _Signal_Manager_initialization( void );
/*
* rtems_signal_catch
@@ -63,7 +73,7 @@ rtems_status_code rtems_signal_send(
rtems_signal_set signal_set
);
-#include <rtems/signalmp.h>
+#include <rtems/rtems/signalmp.h>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/signalmp.h b/cpukit/rtems/include/rtems/rtems/signalmp.h
index b72f476bee..fb25c5a62f 100644
--- a/cpukit/rtems/include/rtems/rtems/signalmp.h
+++ b/cpukit/rtems/include/rtems/rtems/signalmp.h
@@ -21,11 +21,11 @@
extern "C" {
#endif
-#include <rtems/asr.h>
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/thread.h>
-#include <rtems/watchdog.h>
+#include <rtems/rtems/asr.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/watchdog.h>
/*
* The following enumerated type defines the list of
diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h
index 42b8754780..1c00d47bbf 100644
--- a/cpukit/rtems/include/rtems/rtems/status.h
+++ b/cpukit/rtems/include/rtems/rtems/status.h
@@ -52,13 +52,22 @@ typedef enum {
RTEMS_NOT_OWNER_OF_RESOURCE = 23, /* not owner of resource */
RTEMS_NOT_IMPLEMENTED = 24, /* directive not implemented */
RTEMS_INTERNAL_ERROR = 25, /* RTEMS inconsistency detected */
- RTEMS_PROXY_BLOCKING = 26, /* internal multiprocessing only */
- RTEMS_NO_MEMORY = 27 /* could not get enough memory */
+ RTEMS_NO_MEMORY = 26 /* could not get enough memory */
} rtems_status_code;
#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
#define RTEMS_STATUS_CODES_LAST RTEMS_NO_MEMORY
+extern rtems_status_code _Status_Object_name_errors_to_status[];
+
+#ifdef INIT
+rtems_status_code _Status_Object_name_errors_to_status[] = {
+ RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */
+ RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */
+ RTEMS_INVALID_NODE /* OBJECTS_INVALID_NODE */
+};
+#endif
+
/*
* rtems_is_status_successful
*
@@ -86,20 +95,7 @@ STATIC INLINE boolean rtems_are_statuses_equal (
rtems_status_code code2
);
-/*
- * _Status_Is_proxy_blocking
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the status code is equal to the
- * status which indicates that a proxy is blocking, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Status_Is_proxy_blocking (
- rtems_status_code code
-);
-
-#include <rtems/status.inl>
+#include <rtems/rtems/status.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/support.h b/cpukit/rtems/include/rtems/rtems/support.h
index c6452e0847..3cf7eb6840 100644
--- a/cpukit/rtems/include/rtems/rtems/support.h
+++ b/cpukit/rtems/include/rtems/rtems/support.h
@@ -21,7 +21,7 @@
extern "C" {
#endif
-#include <rtems/types.h>
+#include <rtems/rtems/types.h>
/*
* rtems_is_name_valid
@@ -70,7 +70,52 @@ STATIC INLINE void rtems_name_to_characters(
char *c4
);
-#include <rtems/support.inl>
+/*
+ * rtems_get_class
+ *
+ * DESCRIPTION:
+ *
+ * This function returns the class portion of the ID.
+ *
+ */
+
+#define rtems_get_class( _id ) \
+ _Objects_Get_class( _id )
+
+/*
+ * rtems_get_node
+ *
+ * DESCRIPTION:
+ *
+ * This function returns the node portion of the ID.
+ *
+ */
+
+#define rtems_get_node( _id ) \
+ _Objects_Get_node( _id )
+
+/*
+ * rtems_get_index
+ *
+ * DESCRIPTION:
+ *
+ * This function returns the index portion of the ID.
+ *
+ */
+
+#define rtems_get_index( _id ) \
+ _Objects_Get_index( _id )
+
+/*
+ * Time related
+ */
+
+#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
+ TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
+#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
+ TOD_MILLISECONDS_TO_TICKS(_ms)
+
+#include <rtems/rtems/support.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/taskmp.h b/cpukit/rtems/include/rtems/rtems/taskmp.h
index d05277a69c..2010485aba 100644
--- a/cpukit/rtems/include/rtems/rtems/taskmp.h
+++ b/cpukit/rtems/include/rtems/rtems/taskmp.h
@@ -21,12 +21,12 @@
extern "C" {
#endif
-#include <rtems/mppkt.h>
-#include <rtems/object.h>
-#include <rtems/options.h>
-#include <rtems/priority.h>
-#include <rtems/tasks.h>
-#include <rtems/thread.h>
+#include <rtems/core/mppkt.h>
+#include <rtems/core/object.h>
+#include <rtems/rtems/options.h>
+#include <rtems/core/priority.h>
+#include <rtems/rtems/tasks.h>
+#include <rtems/core/thread.h>
/*
* The following enumerated type defines the list of
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index df623fe175..f3abd875fc 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -38,16 +38,13 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/message.h>
-#include <rtems/object.h>
-#include <rtems/part.h>
-#include <rtems/region.h>
-#include <rtems/sem.h>
-#include <rtems/states.h>
-#include <rtems/thread.h>
-#include <rtems/threadq.h>
-#include <rtems/types.h>
+#include <rtems/core/object.h>
+#include <rtems/core/states.h>
+#include <rtems/core/thread.h>
+#include <rtems/rtems/types.h>
+#include <rtems/rtems/eventset.h>
+#include <rtems/rtems/asr.h>
+#include <rtems/rtems/attr.h>
/*
* Constant to be used as the ID of current task
@@ -60,7 +57,106 @@ extern "C" {
* interval when a task wishes to yield the CPU.
*/
-#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
+#define RTEMS_YIELD_PROCESSOR WATCHDOG_NO_TIMEOUT
+
+/*
+ * Define the type for an RTEMS API task priority.
+ */
+
+typedef Priority_Control rtems_task_priority;
+
+#define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY
+
+#define RTEMS_MINIMUM_PRIORITY (PRIORITY_MINIMUM + 1)
+#define RTEMS_MAXIMUM_PRIORITY PRIORITY_MAXIMUM
+
+/*
+ * The following constant is passed to rtems_task_set_priority when the
+ * caller wants to obtain the current priority.
+ */
+
+#define RTEMS_CURRENT_PRIORITY PRIORITY_MINIMUM
+
+/*
+ * Notepads constants (indices into notepad array)
+ */
+
+#define RTEMS_NOTEPAD_FIRST 0 /* lowest numbered notepad */
+#define RTEMS_NOTEPAD_0 0 /* notepad location 0 */
+#define RTEMS_NOTEPAD_1 1 /* notepad location 1 */
+#define RTEMS_NOTEPAD_2 2 /* notepad location 2 */
+#define RTEMS_NOTEPAD_3 3 /* notepad location 3 */
+#define RTEMS_NOTEPAD_4 4 /* notepad location 4 */
+#define RTEMS_NOTEPAD_5 5 /* notepad location 5 */
+#define RTEMS_NOTEPAD_6 6 /* notepad location 6 */
+#define RTEMS_NOTEPAD_7 7 /* notepad location 7 */
+#define RTEMS_NOTEPAD_8 8 /* notepad location 8 */
+#define RTEMS_NOTEPAD_9 9 /* notepad location 9 */
+#define RTEMS_NOTEPAD_10 10 /* notepad location 10 */
+#define RTEMS_NOTEPAD_11 11 /* notepad location 11 */
+#define RTEMS_NOTEPAD_12 12 /* notepad location 12 */
+#define RTEMS_NOTEPAD_13 13 /* notepad location 13 */
+#define RTEMS_NOTEPAD_14 14 /* notepad location 14 */
+#define RTEMS_NOTEPAD_15 15 /* notepad location 15 */
+#define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15 /* highest numbered notepad */
+
+#define RTEMS_NUMBER_NOTEPADS (RTEMS_NOTEPAD_LAST+1)
+
+/*
+ * External API name for Thread_Control
+ */
+
+typedef Thread_Control rtems_tcb;
+
+/*
+ * The following defines the "return type" of an RTEMS task.
+ */
+
+typedef void rtems_task;
+
+/*
+ * The following defines the argument to an RTEMS task.
+ */
+
+typedef unsigned32 rtems_task_argument;
+
+/*
+ * The following defines the type for the entry point of an RTEMS task.
+ */
+
+typedef rtems_task ( *rtems_task_entry )(
+ rtems_task_argument
+ );
+
+/*
+ * The following records define the Initialization Tasks Table.
+ * Each entry contains the information required by RTEMS to
+ * create and start a user task automatically at executive
+ * initialization time.
+ */
+
+typedef struct {
+ rtems_name name; /* task name */
+ unsigned32 stack_size; /* task stack size */
+ rtems_task_priority initial_priority; /* task priority */
+ rtems_attribute attribute_set; /* task attributes */
+ rtems_task_entry entry_point; /* task entry point */
+ rtems_mode mode_set; /* task initial mode */
+ unsigned32 argument; /* task argument */
+} rtems_initialization_tasks_table;
+
+/*
+ * This is the API specific information required by each thread for
+ * the RTEMS API to function correctly.
+ */
+
+
+typedef struct {
+ unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];
+ rtems_event_set pending_events;
+ rtems_event_set event_condition;
+ ASR_Information Signal;
+} RTEMS_API_Control;
/*
* The following defines the information control block used to
@@ -70,6 +166,13 @@ extern "C" {
EXTERN Objects_Information _RTEMS_tasks_Information;
/*
+ * These are used to manage the user initialization tasks.
+ */
+
+EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks;
+EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks;
+
+/*
* _RTEMS_tasks_Manager_initialization
*
* DESCRIPTION:
@@ -78,7 +181,9 @@ EXTERN Objects_Information _RTEMS_tasks_Information;
*/
void _RTEMS_tasks_Manager_initialization(
- unsigned32 maximum_tasks
+ unsigned32 maximum_tasks,
+ unsigned32 number_of_initialization_tasks,
+ rtems_initialization_tasks_table *user_tasks
);
/*
@@ -284,7 +389,7 @@ rtems_status_code rtems_task_wake_when(
*/
rtems_status_code rtems_task_wake_after(
- rtems_interval ticks
+ rtems_interval ticks
);
/*
@@ -313,32 +418,43 @@ STATIC INLINE void _RTEMS_tasks_Free (
);
/*
- * _RTEMS_tasks_Cancel_wait
+ * _RTEMS_tasks_Priority_to_Core
*
* DESCRIPTION:
*
- * This routine unblocks the_thread and cancels any timers
- * which the_thread has active.
+ * This function converts an RTEMS API priority into a core priority.
*/
-
-STATIC INLINE void _RTEMS_tasks_Cancel_wait(
- Thread_Control *the_thread
+
+STATIC INLINE Priority_Control _RTEMS_tasks_Priority_to_Core(
+ rtems_task_priority priority
);
-/*
- * _RTEMS_Tasks_Priority_to_Core
+/*PAGE
*
- * DESCRIPTION:
+ * _RTEMS_tasks_Initialize_user_tasks
*
- * This function converts an RTEMS API priority into a core priority.
+ * This routine creates and starts all configured user
+ * initialzation threads.
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
*/
-STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
- rtems_task_priority priority
+void _RTEMS_tasks_Initialize_user_tasks( void );
+
+/*PAGE
+ *
+ * _RTEMS_tasks_Priority_is_valid
+ *
+ */
+
+STATIC INLINE boolean _RTEMS_tasks_Priority_is_valid (
+ rtems_task_priority the_priority
);
-#include <rtems/tasks.inl>
-#include <rtems/taskmp.h>
+#include <rtems/rtems/tasks.inl>
+#include <rtems/rtems/taskmp.h>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h
index bab05378c7..21e88a4baf 100644
--- a/cpukit/rtems/include/rtems/rtems/timer.h
+++ b/cpukit/rtems/include/rtems/rtems/timer.h
@@ -33,10 +33,9 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/object.h>
-#include <rtems/tod.h>
-#include <rtems/watchdog.h>
+#include <rtems/core/object.h>
+#include <rtems/core/tod.h>
+#include <rtems/core/watchdog.h>
/*
* The following enumerated type details the classes to which a timer
@@ -50,10 +49,15 @@ typedef enum {
} Timer_Classes;
/*
- * The following defines the type of a Timer Service Routine.
+ * The following types define a pointer to a timer service routine.
*/
-
-typedef rtems_timer_service_routine_entry Timer_Service;
+
+typedef void rtems_timer_service_routine;
+
+typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
+ rtems_id,
+ void *
+ );
/*
* The following defines the information control block used to manage
@@ -153,10 +157,10 @@ rtems_status_code rtems_timer_delete(
*/
rtems_status_code rtems_timer_fire_after(
- Objects_Id id,
- rtems_interval ticks,
- Timer_Service routine,
- void *user_data
+ Objects_Id id,
+ rtems_interval ticks,
+ rtems_timer_service_routine_entry routine,
+ void *user_data
);
/*
@@ -170,10 +174,10 @@ rtems_status_code rtems_timer_fire_after(
*/
rtems_status_code rtems_timer_fire_when(
- Objects_Id id,
- rtems_time_of_day *wall_time,
- Timer_Service routine,
- void *user_data
+ Objects_Id id,
+ rtems_time_of_day *wall_time,
+ rtems_timer_service_routine_entry routine,
+ void *user_data
);
/*
@@ -283,7 +287,7 @@ STATIC INLINE boolean _Timer_Is_null (
Timer_Control *the_timer
);
-#include <rtems/timer.inl>
+#include <rtems/rtems/timer.inl>
#ifdef __cplusplus
}
diff --git a/cpukit/rtems/include/rtems/rtems/types.h b/cpukit/rtems/include/rtems/rtems/types.h
index e4d7c11065..3b7a4a5e12 100644
--- a/cpukit/rtems/include/rtems/rtems/types.h
+++ b/cpukit/rtems/include/rtems/rtems/types.h
@@ -20,9 +20,11 @@
extern "C" {
#endif
-#include <rtems/object.h>
-#include <rtems/priority.h>
-#include <rtems/modes.h>
+#include <rtems/core/object.h>
+#include <rtems/core/priority.h>
+#include <rtems/rtems/modes.h>
+#include <rtems/core/mpci.h>
+#include <rtems/core/mppkt.h>
/*
* RTEMS basic type definitions
@@ -51,18 +53,35 @@ typedef Context_Control_fp rtems_context_fp;
typedef CPU_Interrupt_frame rtems_interrupt_frame;
/*
- * Define the type for an RTEMS API task priority.
+ * Time related
*/
-typedef Priority_Control rtems_task_priority;
+typedef Watchdog_Interval rtems_interval;
+typedef TOD_Control rtems_time_of_day;
-#define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY
/*
* Define the type for an RTEMS API task mode.
*/
typedef Modes_Control rtems_mode;
+/*
+ * MPCI related entries
+ */
+
+typedef MP_packet_Classes rtems_mp_packet_classes;
+typedef MP_packet_Prefix rtems_packet_prefix;
+
+typedef MPCI_initialization_entry rtems_mpci_initialization_entry;
+typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry;
+typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry;
+typedef MPCI_send_entry rtems_mpci_send_packet_entry;
+typedef MPCI_receive_entry rtems_mpci_receive_packet_entry;
+
+typedef MPCI_Entry rtems_mpci_entry;
+
+typedef MPCI_Control rtems_mpci_table;
+
#ifdef __cplusplus
}
#endif