RTEMS  5.0.0
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 */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectallocate.c:33
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
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:448
Inlined Routines Associated with the Manipulation of the Scheduler.
Objects_Information Objects
The object information.
Definition: thread.h:979
Thread_Information _RTEMS_tasks_Information
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:66
Definition: thread.h:728
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition: scheduler.h:283
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:464
Objects_Control Object
Definition: thread.h:730
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.
void _Thread_Kill_zombies(void)
Kills all zombie threads in the system.
Definition: threadrestart.c:218
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:850
Scheduler control.
Definition: scheduler.h:266
Inlined Routines from the Thread Handler.
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
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
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Get information of an object from an ID.
Definition: objectgetinfoid.c:24
Classic Tasks Manager Data Structures.
Objects_Id id
Definition: objectdata.h:43
uint32_t rtems_task_priority
Definition: tasks.h:54