[ Pobierz całość w formacie PDF ]

body pass the parameter to it.
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 89
Task management
2.11.16 _task_get_parameter_for
Gets the task creation parameter of the specified task.
Source :
Prototype :uint_32 _task_get_parameter_for(_task_id);
Table 2-85. _task_get_parameter_for arguments
Name Type Direction Description
_task_id tid input Task ID of the task to get creation parameter from.
Returns :
" Creation parameter (might be NULL).
See also :
" _task_get_parameter
" _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
with _task_get_parameter or _task_get_parameter_for rather than have the task's main
body pass the parameter to it.
2.11.17 _task_get_priority
Gets the priority of the task.
Source :
Prototype :_mqx_uint _task_get_priority(_task_id, _mqx_uint_ptr);
Table 2-86. _task_get_priority arguments
Name Type Direction Description
_task_id task_id input One of the following:
- Task ID of the task for which to set or get info.
- MQX_NULL_TASK_ID (Use the calling task.)
_mqx_uint_ptr priority_ptr output Pointer to the priority.
Freescale MQX"! Lite RTOS, Rev. Version 1.1
90 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
Returns :
" MQX_OK
" MQX_INVALID_TASK_ID (Task_id does not represent a currently valid task.)
See also :
" _task_set_priority
" _task_get_creator
" _mutatr_get_sched_protocol
" _mutatr_set_sched_protocol
" _mutex_lock
CAUTION
Might dispatch a task.
2.11.18 _task_get_td
Gets a pointer to the task descriptor for the task ID.
Source :
Prototype :pointer _task_get_td(_task_id);
Table 2-87. _task_get_td arguments
Name Type Direction Description
_task_id task_id input One of:
- Task ID for a task on this processor.
- MQX_NULL_TASK_ID (Use the current task.)
Returns :
" Pointer to the task descriptor for task_id.
" NULL (Task_id is not valid for this processor.)
See also :
" _task_ready
2.11.19 _task_get_template_index
Gets the task template index that is associated with the task name.
Source :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 91
Task management
Prototype :_mqx_uint _task_get_template_index(char_ptr);
Table 2-88. _task_get_template_index arguments
Name Type Direction Description
char_ptr name_ptr input Pointer to the name to find in the task template list.
Returns :
" Task template index 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_id_from_name
" _task_get_index_from_id
2.11.20 _task_get_template_ptr
Gets the pointer to the task template for the task ID.
Source :
Prototype :TASK_TEMPLATE_STRUCT_PTR _task_get_template_ptr(_task_id);
Table 2-89. _task_get_template_ptr arguments
Name Type Direction Description
_task_id task_id input Task ID for the task for which to get pointer.
Returns :
" Pointer to the task's task template. NULL if an invalid task_id is presented.
See also :
" _task_get_template_index
" _task_get_index_from_id
" TASK_TEMPLATE_STRUCT
2.11.21 _task_ready
Makes the task ready to run by putting it in its ready queue.
Source :
Prototype :void _task_ready(pointer);
Freescale MQX"! Lite RTOS, Rev. Version 1.1
92 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
Table 2-90. _task_ready arguments
Name Type Direction Description
pointer td input Pointer to the task descriptor of the task (on this processor) to
be made ready.
See also :
" _time_dequeue
Description :
The function is the only way to make ready a task that called _task_block().
CAUTION
If the new ready task has higher priority than the calling task,
MQX makes the new ready task active. Might set one of the
following task error codes:
- MQX_INVALID_TASK_ID (Task_id is not valid for this
processor.)
- MQX_INVALID_TASK_STATE (Task is already in its ready
queue.)
2.11.22 _task_restart
Restart the specified task.
Source :
Prototype :_mqx_uint _task_restart(_task_id, uint_32_ptr, boolean);
Table 2-91. _task_restart arguments
Name Type Direction Description
_task_id task_id input Task ID of the task to restart.
uint_32_ptr param_ptr input One of the following:
- Pointer to a new task creation parameter.
- NULL
boolean blocked input Whether the task should be restarted in the blocked state or
not.
Returns :
" MQX_OK
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 93
Task management
" MQX_CANNOT_CALL_FUNCTION_FROM_ISR (Function cannot be called from
an ISR.)
" MQX_INVALID_TASK_ID (Task_id is invalid.)
" MQX_OUT_OF_MEMORY (Not enough memory to restart function.)
See also :
" _task_create_at
Description :
The function closes all queues that the task has open, releases all the task's resources, and
frees all memory that is associated with the task's resources.
The function restarts the task with the same task descriptor, task ID, and task stack
(Reserve stack for Stack Start Structure and call the _task_restart_func.).
CAUTION
Cannot be called from an ISR.
2.11.23 _task_restart_func
Restart the specified task.
Source :
Prototype :_mqx_uint _task_restart_func(_task_id task_id, uint_32_ptr param_ptr, boolean
blocked);
Table 2-92. _task_restart_func arguments
Name Type Direction Description
_task_id task_id input Task ID of the task to restart. [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • angamoss.xlx.pl