[ Pobierz całość w formacie PDF ]
active task, blocks it.
2.11.5 _task_get_creator
Gets parent's task ID to the calling task.
Source :
Prototype :_task_id _task_get_creator(void);
Returns :
" Task ID of the parent task.
See also :
" _task_get_id
2.11.6 _task_get_environment
Gets a pointer to the application-specific environment data for the task.
Source :
Prototype :pointer _task_get_environment(_task_id);
Table 2-79. _task_get_environment arguments
Name Type Direction Description
_task_id task_id input Task ID of the task whose environment is to be obtained.
Returns :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
84 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
" Environment data (Success.)
" NULL (Failure.)
See also :
" _task_set_environment
" _task_get_parameter
" _task_get_parameter_for
" _task_set_parameter
" _task_set_parameter_for
" _task_set_error
CAUTION
On failure, calls _task_set_error to set the task error code to
MQX_INVALID_TASK_ID.
2.11.7 _task_get_error
Gets the task error code.
Source :
Prototype :_mqx_uint _task_get_error(void);
Returns :
" Task error code for the active task.
See also :
" _task_get_error_ptr
" _task_set_error
2.11.8 _task_get_error_ptr
Gets a pointer to the task error code.
Source :
Prototype :_mqx_uint_PTR_ _task_get_error_ptr(void);
Returns :
" Pointer to the task error code.
See also :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 85
Task management
" _task_get_error
" _task_set_error
CAUTION
If a task writes to the pointer that _task_get_error_ptr returns,
the task error code is changed to the value, overwriting any
previous error code. To avoid overwriting a previous error
code, a task should use _task_set_error.
2.11.9 _task_get_exception_handler
Gets a pointer to the task exception handler.
Source :
Prototype :TASK_EXCEPTION_FPTR _task_get_exception_handler(_task_id);
Table 2-80. _task_get_exception_handler arguments
Name Type Direction Description
_task_id task_id input Task ID of the task whose exception handler is to be
obtained.
Returns :
" Pointer to the task exception handler for the task (might be NULL).
" NULL (Task ID is not valid.)
See also :
" _task_set_exception_handler
" _task_get_exit_handler
" _task_set_exit_handler
" _task_set_error
CAUTION
On failure, calls _task_set_error to set the task error code to
MQX_INVALID_TASK_ID.
2.11.10 _task_get_exit_handler
Gets a pointer to the task exit handler for the task.
Source :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
86 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
Prototype :TASK_EXIT_FPTR _task_get_exit_handler(_task_id);
Table 2-81. _task_get_exit_handler arguments
Name Type Direction Description
_task_id task_id input Task ID of the task whose exit handler is to be obtained.
Returns :
" Pointer to the exit handler (might be NULL).
" NULL (Task_id is not valid.)
See also :
" _task_set_exit_handler
" _mqx_exit
" _task_get_exception_handler
" _task_set_exception_handler
" _task_abort
" _task_set_error
Description :
MQX calls a task's task exit handler if either of these conditions is true:
- Task is terminated with _task_abort.
- Task returns from its function body (for example, if it calls _mqx_exit).
CAUTION
On failure, calls _task_set_error to set the task error code to
MQX_INVALID_TASK_ID.
2.11.11 _task_get_id
Gets the task ID of the active task.
Source :
Prototype :_task_id _task_get_id(void);
Returns :
" Task ID of the active task.
See also :
" _task_get_creator
" _task_get_id_from_name
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 87
Task management
2.11.12 _task_get_id_from_name
Gets the task ID that is associated with the task name.
Source :
Prototype :_task_id _task_get_id_from_name(char_ptr);
Table 2-82. _task_get_id_from_name arguments
Name Type Direction Description
char_ptr name_ptr input Pointer to the name to find in the task template list.
Returns :
" Task ID that is associated with the first match of name_ptr.
" MQX_NULL_TASK_ID (Name is not in the task template list.)
See also :
" _task_get_creator
" _task_get_id
Description :
This function uses a task name (from its task template) to find a task id. Only the first
task found with the provided name is found.
2.11.13 _task_get_id_from_td
Gets the task ID out of the task descriptor.
Source :
Prototype :_task_id _task_get_id_from_td(pointer);
Table 2-83. _task_get_id_from_td arguments
Name Type Direction Description
pointer td_ptr input Pointer to the task descriptor.
Returns :
" TASK_ID Task ID
" MQX_NULL_TASK_ID
Freescale MQX"! Lite RTOS, Rev. Version 1.1
88 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
2.11.14 _task_get_index_from_id
Gets the task template index for the task ID.
Source :
Prototype :_mqx_uint _task_get_index_from_id(_task_id);
Table 2-84. _task_get_index_from_id arguments
Name Type Direction Description
_task_id task_id input Task ID to look up.
Returns :
" Task template index.
" 0 (Task ID was not found.)
See also :
" _task_get_template_index
2.11.15 _task_get_parameter
Gets the task creation parameter of the active task.
Source :
Prototype :uint_32 _task_get_parameter(void);
Returns :
" Creation parameter (might be NULL).
See also :
" _task_get_parameter_for
" _task_set_parameter
" _task_set_parameter_for
" _task_create_at
Description :
If a deeply nested function needs the task creation parameter, it can get the parameter
[ Pobierz całość w formacie PDF ]