summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/inline
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/inline
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/inline')
-rw-r--r--cpukit/rtems/inline/rtems/rtems/modes.inl28
-rw-r--r--cpukit/rtems/inline/rtems/rtems/tasks.inl18
2 files changed, 31 insertions, 15 deletions
diff --git a/cpukit/rtems/inline/rtems/rtems/modes.inl b/cpukit/rtems/inline/rtems/rtems/modes.inl
index 6331a18a3a..8fe964e8d8 100644
--- a/cpukit/rtems/inline/rtems/rtems/modes.inl
+++ b/cpukit/rtems/inline/rtems/rtems/modes.inl
@@ -23,7 +23,7 @@
*/
STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL (
- rtems_mode mode_set
+ Modes_Control mode_set
)
{
return mode_set & RTEMS_INTERRUPT_MASK;
@@ -36,8 +36,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
)
{
return ( mode_set & masks );
@@ -50,7 +50,7 @@ STATIC INLINE boolean _Modes_Mask_changed (
*/
STATIC INLINE boolean _Modes_Is_asr_disabled (
- rtems_mode mode_set
+ Modes_Control mode_set
)
{
return ( mode_set & RTEMS_ASR_MASK );
@@ -63,7 +63,7 @@ STATIC INLINE boolean _Modes_Is_asr_disabled (
*/
STATIC INLINE boolean _Modes_Is_preempt (
- rtems_mode mode_set
+ Modes_Control mode_set
)
{
return ( ( mode_set & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT );
@@ -76,7 +76,7 @@ STATIC INLINE boolean _Modes_Is_preempt (
*/
STATIC INLINE boolean _Modes_Is_timeslice (
- rtems_mode mode_set
+ Modes_Control mode_set
)
{
return ((mode_set & (RTEMS_TIMESLICE_MASK|RTEMS_PREEMPT_MASK)) ==
@@ -90,7 +90,7 @@ STATIC INLINE boolean _Modes_Is_timeslice (
*/
STATIC INLINE ISR_Level _Modes_Get_interrupt_level (
- rtems_mode mode_set
+ Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
@@ -103,7 +103,7 @@ STATIC INLINE ISR_Level _Modes_Get_interrupt_level (
*/
STATIC INLINE void _Modes_Set_interrupt_level (
- rtems_mode mode_set
+ Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
@@ -116,14 +116,14 @@ 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
)
{
- rtems_mode _out_mode;
+ Modes_Control _out_mode;
_out_mode = old_mode_set;
_out_mode &= ~mask;
diff --git a/cpukit/rtems/inline/rtems/rtems/tasks.inl b/cpukit/rtems/inline/rtems/rtems/tasks.inl
index d392b8b370..2aec654571 100644
--- a/cpukit/rtems/inline/rtems/rtems/tasks.inl
+++ b/cpukit/rtems/inline/rtems/rtems/tasks.inl
@@ -43,7 +43,10 @@ STATIC INLINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
- _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
+ _Objects_Free(
+ _Objects_Get_information( the_task->Object.id ),
+ &the_task->Object
+ );
}
/*PAGE
@@ -61,6 +64,7 @@ STATIC INLINE void _RTEMS_tasks_Cancel_wait(
state = the_thread->current_state;
+/* XXX do this with the object class */
if ( _States_Is_waiting_on_thread_queue( state ) ) {
if ( _States_Is_waiting_for_rpc_reply( state ) &&
_States_Is_locally_blocked( state ) ) {
@@ -91,5 +95,17 @@ STATIC INLINE void _RTEMS_tasks_Cancel_wait(
(void) _Watchdog_Remove( &the_thread->Timer );
}
+/*PAGE
+ *
+ * _RTEMS_Tasks_Priority_to_Core
+ */
+
+STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core(
+ rtems_task_priority priority
+)
+{
+ return (Priority_Control) priority;
+}
+
#endif
/* end of include file */