RTEMS
Classes | Macros | Typedefs | Functions
tasks.h File Reference

This header file defines the main parts of the Tasks Manager API. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/cpuset.h>
#include <rtems/rtems/attr.h>
#include <rtems/rtems/modes.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
#include <rtems/score/basedefs.h>
#include <rtems/score/context.h>
#include <rtems/score/cpu.h>
#include <rtems/score/object.h>
#include <rtems/score/smp.h>
#include <rtems/score/stack.h>
#include <rtems/score/watchdogticks.h>

Go to the source code of this file.

Classes

struct  rtems_task_config
 This structure defines the configuration of a task constructed by rtems_task_construct(). More...
 
struct  rtems_initialization_tasks_table
 % More...
 

Macros

#define RTEMS_CURRENT_PRIORITY   0
 This constant is passed to {set-priority:/name}() when the caller wants to obtain the current priority.
 
#define rtems_scheduler_get_processor()   _SMP_Get_current_processor()
 Returns the index of the current processor. More...
 
#define rtems_scheduler_get_processor_maximum()   _SMP_Get_processor_maximum()
 Returns the processor maximum supported by the system. More...
 
#define RTEMS_CONFIGURED_MINIMUM_STACK_SIZE   0
 %
 
#define RTEMS_MAXIMUM_PRIORITY   _RTEMS_Maximum_priority()
 %
 
#define RTEMS_MINIMUM_PRIORITY   1
 %
 
#define RTEMS_MINIMUM_STACK_SIZE   STACK_MINIMUM_SIZE
 %
 
#define RTEMS_NO_PRIORITY   RTEMS_CURRENT_PRIORITY
 %
 
#define RTEMS_SELF   OBJECTS_ID_OF_SELF
 %
 
#define RTEMS_TASK_STORAGE_ALIGNMENT   CPU_HEAP_ALIGNMENT
 This constant defines the recommended alignment of a task storage area in bytes. More...
 
#define RTEMS_TASK_STORAGE_SIZE(_size, _attributes)
 Returns the recommended task storage area size for the specified size and task attributes. More...
 
#define RTEMS_YIELD_PROCESSOR   WATCHDOG_NO_TIMEOUT
 %
 

Typedefs

typedef uint32_t rtems_task_priority
 %
 
typedef void rtems_task
 %
 
typedef CPU_Uint32ptr rtems_task_argument
 This type is used to represent task argument values. More...
 
typedef struct _Thread_Control rtems_tcb
 %
 
typedef rtems_task(* rtems_task_entry) (rtems_task_argument)
 This type defines the entry point of an RTEMS task.
 
typedef bool(* rtems_task_visitor) (rtems_tcb *, void *)
 %
 

Functions

rtems_task_priority _RTEMS_Maximum_priority (void)
 Returns the maximum priority of the scheduler with index zero.
 
rtems_status_code rtems_scheduler_add_processor (rtems_id scheduler_id, uint32_t cpu_index)
 Adds the processor to the set of processors owned by the scheduler instance. More...
 
rtems_status_code rtems_scheduler_get_maximum_priority (rtems_id scheduler_id, rtems_task_priority *priority)
 Gets the maximum task priority of the scheduler instance. More...
 
rtems_status_code rtems_scheduler_get_processor_set (rtems_id scheduler_id, size_t cpusetsize, cpu_set_t *cpuset)
 Gets the set of processors owned by the scheduler instance. More...
 
rtems_status_code rtems_scheduler_ident (rtems_name name, rtems_id *id)
 Identifies a scheduler instance by its name. More...
 
rtems_status_code rtems_scheduler_ident_by_processor (uint32_t cpu_index, rtems_id *id)
 Identifies a scheduler instance by a processor index. More...
 
rtems_status_code rtems_scheduler_ident_by_processor_set (size_t cpusetsize, const cpu_set_t *cpuset, rtems_id *id)
 Identifies a scheduler instance by a processor set. More...
 
rtems_status_code rtems_scheduler_map_priority_from_posix (rtems_id scheduler_id, int posix_priority, rtems_task_priority *priority)
 Maps a POSIX thread priority to the corresponding Classic API task priority. More...
 
rtems_status_code rtems_scheduler_map_priority_to_posix (rtems_id scheduler_id, rtems_task_priority priority, int *posix_priority)
 Maps a Classic API task priority to the corresponding POSIX thread priority. More...
 
rtems_status_code rtems_scheduler_remove_processor (rtems_id scheduler_id, uint32_t cpu_index)
 Removes a processor from set of processors owned by the scheduler instance. More...
 
rtems_status_code rtems_task_construct (const rtems_task_config *config, rtems_id *id)
 Constructs a task from the specified the task configuration. More...
 
rtems_status_code rtems_task_create (rtems_name name, rtems_task_priority initial_priority, size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id)
 Creates a task object. More...
 
rtems_status_code rtems_task_delete (rtems_id id)
 % More...
 
RTEMS_NO_RETURN void rtems_task_exit (void)
 %
 
rtems_status_code rtems_task_get_affinity (rtems_id id, size_t cpusetsize, cpu_set_t *cpuset)
 % More...
 
rtems_status_code rtems_task_get_priority (rtems_id task_id, rtems_id scheduler_id, rtems_task_priority *priority)
 % More...
 
rtems_status_code rtems_task_get_scheduler (rtems_id task_id, rtems_id *scheduler_id)
 % More...
 
rtems_status_code rtems_task_ident (rtems_name name, uint32_t node, rtems_id *id)
 Identifies a task object by the specified object name. More...
 
rtems_status_code rtems_task_is_suspended (rtems_id id)
 % More...
 
void rtems_task_iterate (rtems_task_visitor visitor, void *arg)
 % More...
 
rtems_status_code rtems_task_mode (rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set)
 % More...
 
rtems_status_code rtems_task_restart (rtems_id id, rtems_task_argument argument)
 % More...
 
rtems_status_code rtems_task_resume (rtems_id id)
 % More...
 
rtems_id rtems_task_self (void)
 %
 
rtems_status_code rtems_task_set_affinity (rtems_id id, size_t cpusetsize, const cpu_set_t *cpuset)
 % More...
 
rtems_status_code rtems_task_set_priority (rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority)
 % More...
 
rtems_status_code rtems_task_set_scheduler (rtems_id task_id, rtems_id scheduler_id, rtems_task_priority priority)
 % More...
 
rtems_status_code rtems_task_start (rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument)
 % More...
 
rtems_status_code rtems_task_suspend (rtems_id id)
 % More...
 
rtems_status_code rtems_task_wake_after (rtems_interval ticks)
 % More...
 
rtems_status_code rtems_task_wake_when (rtems_time_of_day *time_buffer)
 % More...
 

Detailed Description

This header file defines the main parts of the Tasks Manager API.

Definition in file tasks.h.