RTEMS
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 typedef rtems_status_code ( *RTEMS_tasks_Prepare_stack )(
47  const rtems_task_config *
48 );
49 
50 rtems_status_code _RTEMS_tasks_Create(
51  const rtems_task_config *config,
52  rtems_id *id,
53  RTEMS_tasks_Prepare_stack prepare_stack
54 );
55 
56 RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void)
57 {
59 
61 
62  return (Thread_Control *)
64 }
65 
73  Thread_Control *the_task
74 )
75 {
78  &the_task->Object
79  );
80 }
81 
97  const Scheduler_Control *scheduler,
98  rtems_task_priority priority,
99  bool *valid
100 )
101 {
102  *valid = ( priority <= scheduler->maximum_priority );
103 
104  return _Scheduler_Map_priority( scheduler, (Priority_Control) priority );
105 }
106 
117  const Scheduler_Control *scheduler,
118  Priority_Control priority
119 )
120 {
121  return (rtems_task_priority)
122  _Scheduler_Unmap_priority( scheduler, priority );
123 }
124 
127 #if defined(RTEMS_MULTIPROCESSING)
128 #include <rtems/rtems/taskmp.h>
129 #endif
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif
136 /* end of include file */
static __inline__ 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:96
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
static __inline__ Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectimpl.h:877
void _Thread_Kill_zombies(void)
Kills all zombie threads in the system.
static __inline__ Priority_Control _Scheduler_Map_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Maps a thread priority from the user domain to the scheduler domain.
static __inline__ void _RTEMS_tasks_Free(Thread_Control *the_task)
Frees a task control block.
Definition: tasksimpl.h:72
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.
Objects_Information Objects
The object information.
Definition: thread.h:1004
This structure defines the configuration of a task constructed by rtems_task_construct().
Definition: tasks.h:134
Thread_Information _RTEMS_tasks_Information
static __inline__ void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:834
uint32_t rtems_task_priority
%
Definition: tasks.h:94
Inlined Routines in the Object Handler.
static __inline__ Priority_Control _Scheduler_Unmap_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Unmaps a thread priority from the scheduler domain to the user domain.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition: scheduler.h:281
The configuration of a new thread to initialize.
Definition: threadimpl.h:130
Objects_Control Object
Definition: thread.h:727
void _RTEMS_tasks_Initialize_user_tasks(void)
RTEMS User Task Initialization.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
Scheduler control.
Definition: scheduler.h:264
Inlined Routines from the Thread Handler.
static __inline__ 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:116
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
Definition: basedefs.h:683
Classic Tasks Manager Data Structures.
static __inline__ void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:933
Objects_Id id
Definition: objectdata.h:43