11.07.2015 Views

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>,all resources which are held by the terminated task are released. Any task may be terminatedregardless of its state. This functionality is default for any 16-bit or 32-bit CPU and may be changed by recompiling<strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> sources. On 8-bit CPUs, terminating tasks that hold any resources is prohibited. To enable safetermination, the <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> sources have to be recompiled with the compile time switchOS_SUPPORT_CLEANUP_ON_TERMINATE activated.ImportantThis function may not be called from within an interrupt handler.OS_WakeTask()DescriptionEnds delay of a task immediately.Prototypevoid OS_WakeTask (OS_TASK* pTask);ParameterDescriptionpTaskPointer to a data structure of type OS_TASK which is used as task control block (and reference)for this task.Table 17: OS_WakeTask() parameter listAdditional InformationPuts the specified task, which is already suspended for a certain amount of time with OS_Delay() orOS_DelayUntil() back to the state TS_READY (ready for execution).The specified task will be activated immediately if it has a higher priority than the priority of the task that had thehighest priority before. If the specified task is not in the state TS_DELAY (because it has already been activated, orthe delay has already expired, or for some other reason), this command is ignored.OS_IsTask()DescriptionDetermines whether a task control block actually belongs to a valid task.Prototypechar OS_IsTask (OS_TASK* pTask);ParameterDescriptionpTaskPointer to a data structure of type OS_TASK which is used as task control block (and reference)for this task.Table 18: OS_IsTask() parameter listReturn valueCharacter value:0: TCB is not used by any task1: TCB is used by a taskAdditional InformationThis function checks if the specified task is still in the internal task list. If the task was terminated, it is removed fromthe internal task list. This function may be useful to determine whether the task control block and stack for the taskmay be reused for another task in applications that create and terminate tasks dynamically.OS_GetTaskID()DescriptionReturns the ID of the currently running task.PrototypeOS_TASKID OS_GetTaskID (void);34<strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>for ARM CoresPP<strong>RTOS</strong>-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!