RTEMS CPU Kit with SuperCore  4.11.3
tasksimpl.h
Go to the documentation of this file.
1 
9 /* COPYRIGHT (c) 1989-2014.
10  * On-Line Applications Research Corporation (OAR).
11  *
12  * The license and distribution terms for this file may be
13  * found in the file LICENSE in this distribution or at
14  * http://www.rtems.org/license/LICENSE.
15  */
16 
17 #ifndef _RTEMS_RTEMS_TASKSIMPL_H
18 #define _RTEMS_RTEMS_TASKSIMPL_H
19 
20 #include <rtems/rtems/tasks.h>
21 #include <rtems/score/objectimpl.h>
22 #include <rtems/score/threadimpl.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
44 #ifndef RTEMS_TASKS_EXTERN
45 #define RTEMS_TASKS_EXTERN extern
46 #endif
47 
53 
60 
68 
69 #if !defined(RTEMS_SMP)
70 
79  Thread_Control *the_thread,
82 #endif
83 
84 RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void)
85 {
87 
89 
90  return (Thread_Control *)
91  _Objects_Allocate_unprotected( &_RTEMS_tasks_Information );
92 }
93 
101  Thread_Control *the_task
102 )
103 {
106  &the_task->Object
107  );
108 }
109 
116  rtems_task_priority priority
117 )
118 {
119  return (Priority_Control) priority;
120 }
121 
128  Priority_Control priority
129 )
130 {
131  return (rtems_task_priority) priority;
132 }
133 
141  rtems_task_priority the_priority
142 )
143 {
144  return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
145  ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
146 }
147 
150 #if defined(RTEMS_MULTIPROCESSING)
151 #include <rtems/rtems/taskmp.h>
152 #endif
153 
154 #ifdef __cplusplus
155 }
156 #endif
157 
158 #endif
159 /* end of include file */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
void _RTEMS_tasks_Manager_initialization(void)
RTEMS Task Manager Initialization.
Definition: tasks.c:205
Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectallocate.c:39
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
uint32_t Priority_Control
The following type defines the control block used to manage thread priorities.
Definition: priority.h:56
Priority_Control rtems_task_priority
Define the type for an RTEMS API task priority.
Definition: tasks.h:79
Objects_Control Object
This field is the object management structure for each thread.
Definition: thread.h:673
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
void _RTEMS_Tasks_Invoke_task_variable_dtor(Thread_Control *the_thread, rtems_task_variable_t *tvp)
RTEMS Tasks Invoke Task Variable Destructor.
Definition: taskvariable_invoke_dtor.c:31
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free(Thread_Control *the_task)
Frees a task control block.
Definition: tasksimpl.h:100
void _RTEMS_tasks_Initialize_user_tasks(void)
RTEMS User Task Initialization.
Definition: tasks.c:244
The following defines the structure for the information used to manage each class of objects...
Definition: objectimpl.h:136
#define RTEMS_MINIMUM_PRIORITY
This constant is the least valid value for a Classic API task priority.
Definition: tasks.h:93
#define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE
Instructs the compiler to issue a warning whenever a variable or function with this attribute will be...
Definition: basedefs.h:186
void _Thread_Kill_zombies(void)
Kills all zombie threads in the system.
Definition: threadrestart.c:149
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid(rtems_task_priority the_priority)
Checks whether the priority is a valid user task.
Definition: tasksimpl.h:140
RTEMS_INLINE_ROUTINE rtems_task_priority _RTEMS_tasks_Priority_from_Core(Priority_Control priority)
Converts a core priority into an RTEMS API priority.
Definition: tasksimpl.h:127
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:1007
RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_tasks_Priority_to_Core(rtems_task_priority priority)
Converts an RTEMS API priority into a core priority.
Definition: tasksimpl.h:115
Inlined Routines from the Thread Handler.
#define RTEMS_MAXIMUM_PRIORITY
This constant is the maximum valid value for a Classic API task priority.
Definition: tasks.h:105
RTEMS_TASKS_EXTERN Objects_Information _RTEMS_tasks_Information
The following instantiates the information control block used to manage this class of objects...
Definition: tasksimpl.h:52
Inlined Routines in the Object Handler.
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Get information of an object from an ID.
Definition: objectgetinfoid.c:24
#define RTEMS_TASKS_EXTERN
Instantiate RTEMS Classic API Tasks Data.
Definition: tasksimpl.h:45
Internal structure used to manager per task variables.
Definition: thread.h:188
Objects_Id id
This is the object&#39;s ID.
Definition: object.h:236