RTEMS  5.1
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/tasksdata.h>
21 #include <rtems/score/objectimpl.h>
23 #include <rtems/score/threadimpl.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
44 
45 RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void)
46 {
48 
50 
51  return (Thread_Control *)
53 }
54 
62  Thread_Control *the_task
63 )
64 {
67  &the_task->Object
68  );
69 }
70 
86  const Scheduler_Control *scheduler,
87  rtems_task_priority priority,
88  bool *valid
89 )
90 {
91  *valid = ( priority <= scheduler->maximum_priority );
92 
93  return _Scheduler_Map_priority( scheduler, (Priority_Control) priority );
94 }
95 
106  const Scheduler_Control *scheduler,
107  Priority_Control priority
108 )
109 {
110  return (rtems_task_priority)
111  _Scheduler_Unmap_priority( scheduler, priority );
112 }
113 
116 #if defined(RTEMS_MULTIPROCESSING)
117 #include <rtems/rtems/taskmp.h>
118 #endif
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif
125 /* end of include file */
RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectimpl.h:874
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
void _Thread_Kill_zombies(void)
Kills all zombie threads in the system.
Definition: threadrestart.c:216
Inlined Routines Associated with the Manipulation of the Scheduler.
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Gets information of an object from an ID.
Definition: objectgetinfoid.c:24
Objects_Information Objects
The object information.
Definition: thread.h:1001
Thread_Information _RTEMS_tasks_Information
RTEMS_INLINE_ROUTINE Priority_Control _Scheduler_Map_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Maps a thread priority from the user domain to the scheduler domain.
Definition: schedulerimpl.h:453
Definition: thread.h:732
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition: scheduler.h:286
Objects_Control Object
Definition: thread.h:734
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free(Thread_Control *the_task)
Frees a task control block.
Definition: tasksimpl.h:61
void _RTEMS_tasks_Initialize_user_tasks(void)
RTEMS User Task Initialization.
RTEMS_INLINE_ROUTINE void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:930
RTEMS_INLINE_ROUTINE Priority_Control _Scheduler_Unmap_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Unmaps a thread priority from the scheduler domain to the user domain.
Definition: schedulerimpl.h:469
Scheduler control.
Definition: scheduler.h:269
Inlined Routines from the Thread Handler.
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:831
Inlined Routines in the Object Handler.
RTEMS_INLINE_ROUTINE rtems_task_priority _RTEMS_Priority_From_core(const Scheduler_Control *scheduler, Priority_Control priority)
Converts the SuperCore priority to the corresponding RTEMS API priority.
Definition: tasksimpl.h:105
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_Priority_To_core(const Scheduler_Control *scheduler, rtems_task_priority priority, bool *valid)
Converts the RTEMS API priority to the corresponding SuperCore priority and validates it.
Definition: tasksimpl.h:85
Classic Tasks Manager Data Structures.
Objects_Id id
Definition: objectdata.h:43
uint32_t rtems_task_priority
Definition: tasks.h:55