summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-28 15:30:29 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-28 15:30:29 +0000
commit7f6a24abdd1793e394e4d5d49de1f4ca0e00297a (patch)
treefbdb1ec31289dabb5bf41ed769d4b40ca8cf9a9a /cpukit/rtems/include/rtems
parentMoved _Thread_Information -> _RTEMS_tasks_Information. (diff)
downloadrtems-7f6a24abdd1793e394e4d5d49de1f4ca0e00297a.tar.bz2
Added unused priority ceiling parameter to rtems_semaphore_create.
Rearranged code to created thread handler routines to initialize, start, restart, and "close/delete" a thread. Made internal threads their own object class. This now uses the thread support routines for starting and initializing a thread. Insured deleted tasks are freed to the Inactive pool associated with the correct Information block. Added an RTEMS API specific data area to the thread control block. Beginnings of removing the word "rtems" from the core.
Diffstat (limited to 'cpukit/rtems/include/rtems')
-rw-r--r--cpukit/rtems/include/rtems/rtems/asr.h10
-rw-r--r--cpukit/rtems/include/rtems/rtems/attr.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/modes.h28
-rw-r--r--cpukit/rtems/include/rtems/rtems/sem.h9
-rw-r--r--cpukit/rtems/include/rtems/rtems/signal.h3
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h27
-rw-r--r--cpukit/rtems/include/rtems/rtems/types.h15
7 files changed, 62 insertions, 32 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/asr.h b/cpukit/rtems/include/rtems/rtems/asr.h
index 44d03f2802..b2147f8df4 100644
--- a/cpukit/rtems/include/rtems/rtems/asr.h
+++ b/cpukit/rtems/include/rtems/rtems/asr.h
@@ -54,11 +54,11 @@ typedef rtems_asr ( *rtems_asr_entry )(
*/
typedef struct {
- rtems_asr_entry handler; /* address of RTEMS_ASR */
- rtems_mode mode_set; /* RTEMS_ASR mode */
- rtems_signal_set signals_posted; /* signal set */
- rtems_signal_set signals_pending; /* pending signal set */
- unsigned32 nest_level; /* nest level of RTEMS_ASR */
+ rtems_asr_entry handler; /* address of RTEMS_ASR */
+ Modes_Control mode_set; /* RTEMS_ASR mode */
+ rtems_signal_set signals_posted; /* signal set */
+ rtems_signal_set signals_pending; /* pending signal set */
+ unsigned32 nest_level; /* nest level of RTEMS_ASR */
} ASR_Information;
/*
diff --git a/cpukit/rtems/include/rtems/rtems/attr.h b/cpukit/rtems/include/rtems/rtems/attr.h
index a94343e164..950d77f73d 100644
--- a/cpukit/rtems/include/rtems/rtems/attr.h
+++ b/cpukit/rtems/include/rtems/rtems/attr.h
@@ -27,7 +27,7 @@ typedef unsigned32 rtems_attribute;
/* constants */
-#define RTEMS_DEFAULT_ATTRIBUTES 0x00000000
+#define RTEMS_DEFAULT_ATTRIBUTES 0x00000000
#define RTEMS_NO_FLOATING_POINT 0x00000000 /* don't use FP HW */
#define RTEMS_FLOATING_POINT 0x00000001 /* utilize coprocessor */
diff --git a/cpukit/rtems/include/rtems/rtems/modes.h b/cpukit/rtems/include/rtems/rtems/modes.h
index 9e714591ab..b3b05b3f85 100644
--- a/cpukit/rtems/include/rtems/rtems/modes.h
+++ b/cpukit/rtems/include/rtems/rtems/modes.h
@@ -28,7 +28,7 @@ extern "C" {
* each a mode set.
*/
-typedef unsigned32 rtems_mode;
+typedef unsigned32 Modes_Control;
/*
* The following constants define the individual modes and masks
@@ -73,7 +73,7 @@ typedef unsigned32 rtems_mode;
*/
STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL (
- rtems_mode mode_set
+ Modes_Control mode_set
);
/*
@@ -86,8 +86,8 @@ STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL (
*/
STATIC INLINE boolean _Modes_Mask_changed (
- rtems_mode mode_set,
- rtems_mode masks
+ Modes_Control mode_set,
+ Modes_Control masks
);
/*
@@ -100,7 +100,7 @@ STATIC INLINE boolean _Modes_Mask_changed (
*/
STATIC INLINE boolean _Modes_Is_asr_disabled (
- rtems_mode mode_set
+ Modes_Control mode_set
);
/*
@@ -113,7 +113,7 @@ STATIC INLINE boolean _Modes_Is_asr_disabled (
*/
STATIC INLINE boolean _Modes_Is_preempt (
- rtems_mode mode_set
+ Modes_Control mode_set
);
/*
@@ -126,7 +126,7 @@ STATIC INLINE boolean _Modes_Is_preempt (
*/
STATIC INLINE boolean _Modes_Is_timeslice (
- rtems_mode mode_set
+ Modes_Control mode_set
);
/*
@@ -138,7 +138,7 @@ STATIC INLINE boolean _Modes_Is_timeslice (
*/
STATIC INLINE ISR_Level _Modes_Get_interrupt_level (
- rtems_mode mode_set
+ Modes_Control mode_set
);
/*
@@ -151,7 +151,7 @@ STATIC INLINE ISR_Level _Modes_Get_interrupt_level (
*/
STATIC INLINE void _Modes_Set_interrupt_level (
- rtems_mode mode_set
+ Modes_Control mode_set
);
/*
@@ -166,11 +166,11 @@ STATIC INLINE void _Modes_Set_interrupt_level (
*/
STATIC INLINE void _Modes_Change (
- rtems_mode old_mode_set,
- rtems_mode new_mode_set,
- rtems_mode mask,
- rtems_mode *out_mode_set,
- rtems_mode *changed
+ Modes_Control old_mode_set,
+ Modes_Control new_mode_set,
+ Modes_Control mask,
+ Modes_Control *out_mode_set,
+ Modes_Control *changed
);
#include <rtems/modes.inl>
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
index e70253dcb1..ff8abbc773 100644
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ b/cpukit/rtems/include/rtems/rtems/sem.h
@@ -82,10 +82,11 @@ void _Semaphore_Manager_initialization(
*/
rtems_status_code rtems_semaphore_create(
- rtems_name name,
- unsigned32 count,
- rtems_attribute attribute_set,
- Objects_Id *id
+ rtems_name name,
+ unsigned32 count,
+ rtems_attribute attribute_set,
+ rtems_task_priority priority_ceiling,
+ Objects_Id *id
);
/*
diff --git a/cpukit/rtems/include/rtems/rtems/signal.h b/cpukit/rtems/include/rtems/rtems/signal.h
index 2466a8f931..74ff4a57fb 100644
--- a/cpukit/rtems/include/rtems/rtems/signal.h
+++ b/cpukit/rtems/include/rtems/rtems/signal.h
@@ -31,6 +31,7 @@ extern "C" {
#include <rtems/modes.h>
#include <rtems/object.h>
#include <rtems/status.h>
+#include <rtems/types.h>
/*
* rtems_signal_catch
@@ -45,7 +46,7 @@ extern "C" {
rtems_status_code rtems_signal_catch(
rtems_asr_entry asr_handler,
- rtems_mode mode_set
+ rtems_mode mode_set
);
/*
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index 2f1021f8c9..df623fe175 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -47,6 +47,7 @@ extern "C" {
#include <rtems/states.h>
#include <rtems/thread.h>
#include <rtems/threadq.h>
+#include <rtems/types.h>
/*
* Constant to be used as the ID of current task
@@ -94,12 +95,12 @@ void _RTEMS_tasks_Manager_initialization(
*/
rtems_status_code rtems_task_create(
- rtems_name name,
- rtems_task_priority initial_priority,
- unsigned32 stack_size,
- rtems_mode initial_modes,
- rtems_attribute attribute_set,
- Objects_Id *id
+ rtems_name name,
+ rtems_task_priority initial_priority,
+ unsigned32 stack_size,
+ rtems_mode initial_modes,
+ rtems_attribute attribute_set,
+ Objects_Id *id
);
/*
@@ -237,7 +238,7 @@ rtems_status_code rtems_task_resume(
*/
rtems_status_code rtems_task_set_priority(
- Objects_Id id,
+ Objects_Id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
);
@@ -324,6 +325,18 @@ STATIC INLINE void _RTEMS_tasks_Cancel_wait(
Thread_Control *the_thread
);
+/*
+ * _RTEMS_Tasks_Priority_to_Core
+ *
+ * DESCRIPTION:
+ *
+ * This function converts an RTEMS API priority into a core priority.
+ */
+
+STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
+ rtems_task_priority priority
+);
+
#include <rtems/tasks.inl>
#include <rtems/taskmp.h>
diff --git a/cpukit/rtems/include/rtems/rtems/types.h b/cpukit/rtems/include/rtems/rtems/types.h
index 2a5cb6f4fd..e4d7c11065 100644
--- a/cpukit/rtems/include/rtems/rtems/types.h
+++ b/cpukit/rtems/include/rtems/rtems/types.h
@@ -21,6 +21,8 @@ extern "C" {
#endif
#include <rtems/object.h>
+#include <rtems/priority.h>
+#include <rtems/modes.h>
/*
* RTEMS basic type definitions
@@ -48,6 +50,19 @@ typedef Context_Control rtems_context;
typedef Context_Control_fp rtems_context_fp;
typedef CPU_Interrupt_frame rtems_interrupt_frame;
+/*
+ * Define the type for an RTEMS API task priority.
+ */
+
+typedef Priority_Control rtems_task_priority;
+
+#define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY
+/*
+ * Define the type for an RTEMS API task mode.
+ */
+
+typedef Modes_Control rtems_mode;
+
#ifdef __cplusplus
}
#endif