RTEMS 6.1-rc1
|
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/stack.h>
#include <rtems/score/watchdogticks.h>
Go to the source code of this file.
Data Structures | |
struct | rtems_task_config |
This structure defines the configuration of a task constructed by rtems_task_construct(). More... | |
struct | rtems_initialization_tasks_table |
This structure defines the properties of the Classic API user initialization task. More... | |
Macros | |
#define | RTEMS_CONFIGURED_MINIMUM_STACK_SIZE 0 |
This constant can be used to indicate that the task should be created with the configured minimum stack size. More... | |
#define | RTEMS_CURRENT_PRIORITY 0 |
This constant is passed to rtems_task_set_priority() when the caller wants to obtain the current priority. | |
#define | RTEMS_MAXIMUM_PRIORITY _RTEMS_Maximum_priority() |
This runtime constant represents the lowest (least important) task priority of the scheduler with index zero. | |
#define | RTEMS_MINIMUM_PRIORITY 1 |
This compile time constant provides the highest (most important) task priority settable by the API. | |
#define | RTEMS_MINIMUM_STACK_SIZE STACK_MINIMUM_SIZE |
This compile time constant provides the minimum task stack size recommended for the target architecture. More... | |
#define | RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY |
This compile time constant may be used for the rtems_task_set_priority() directive to get the current task priority. | |
#define | RTEMS_SELF OBJECTS_ID_OF_SELF |
This compile time constant may be used to identify the calling task in task related directives. | |
#define | RTEMS_TASK_STORAGE_ALIGNMENT CPU_STACK_ALIGNMENT |
This compile time constant defines the recommended alignment of a task storage area in bytes. More... | |
#define | RTEMS_TASK_STORAGE_SIZE(_size, _attributes) ( ( _size ) + CONTEXT_FP_SIZE ) |
Gets the recommended task storage area size for the size and task attributes. More... | |
#define | RTEMS_YIELD_PROCESSOR WATCHDOG_NO_TIMEOUT |
This compile time constant may be passed to the rtems_task_wake_after() directive as the interval when a task wishes to yield the processor. | |
Typedefs | |
typedef CPU_Uint32ptr | rtems_task_argument |
This integer type represents task argument values. More... | |
typedef void | rtems_task |
This type defines the return type of task entry points. More... | |
typedef rtems_task(* | rtems_task_entry) (rtems_task_argument) |
This type defines the task entry point of an RTEMS task. | |
typedef struct _Thread_Control | rtems_tcb |
This structure represents the TCB. | |
typedef bool(* | rtems_task_visitor) (rtems_tcb *, void *) |
Visitor routines invoked by rtems_task_iterate() shall have this type. | |
Functions | |
rtems_task_priority | _RTEMS_Maximum_priority (void) |
Returns the maximum priority of the scheduler with index zero. | |
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. More... | |
rtems_status_code | rtems_task_construct (const rtems_task_config *config, rtems_id *id) |
Constructs a task from the specified task configuration. More... | |
rtems_status_code | rtems_task_ident (rtems_name name, uint32_t node, rtems_id *id) |
Identifies a task by the object name. More... | |
rtems_id | rtems_task_self (void) |
Gets the task identifier of the calling task. More... | |
rtems_status_code | rtems_task_start (rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument) |
Starts the task. More... | |
rtems_status_code | rtems_task_restart (rtems_id id, rtems_task_argument argument) |
Restarts the task. More... | |
rtems_status_code | rtems_task_delete (rtems_id id) |
Deletes the task. More... | |
RTEMS_NO_RETURN void | rtems_task_exit (void) |
Deletes the calling task. More... | |
rtems_status_code | rtems_task_suspend (rtems_id id) |
Suspends the task. More... | |
rtems_status_code | rtems_task_resume (rtems_id id) |
Resumes the task. More... | |
rtems_status_code | rtems_task_is_suspended (rtems_id id) |
Checks if the task is suspended. More... | |
rtems_status_code | rtems_task_set_priority (rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority) |
Sets the real priority or gets the current priority of the task. More... | |
rtems_status_code | rtems_task_get_priority (rtems_id task_id, rtems_id scheduler_id, rtems_task_priority *priority) |
Gets the current priority of the task with respect to the scheduler. More... | |
rtems_status_code | rtems_task_mode (rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set) |
Gets and optionally sets the mode of the calling task. More... | |
rtems_status_code | rtems_task_wake_after (rtems_interval ticks) |
Wakes up after a count of clock ticks have occurred or yields the processor. More... | |
rtems_status_code | rtems_task_wake_when (const rtems_time_of_day *time_buffer) |
Wakes up when specified. More... | |
rtems_status_code | rtems_task_get_scheduler (rtems_id task_id, rtems_id *scheduler_id) |
Gets the home scheduler of the task. More... | |
rtems_status_code | rtems_task_set_scheduler (rtems_id task_id, rtems_id scheduler_id, rtems_task_priority priority) |
Sets the home scheduler for the task. More... | |
rtems_status_code | rtems_task_get_affinity (rtems_id id, size_t cpusetsize, cpu_set_t *cpuset) |
Gets the processor affinity of the task. More... | |
rtems_status_code | rtems_task_set_affinity (rtems_id id, size_t cpusetsize, const cpu_set_t *cpuset) |
Sets the processor affinity of the task. More... | |
void | rtems_task_iterate (rtems_task_visitor visitor, void *arg) |
Iterates over all tasks and invokes the visitor routine for each task. More... | |
This header file defines the main parts of the Tasks Manager API.