IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide IAR PowerPac RTOS User Guide

ie.ksu.edu.tw
from ie.ksu.edu.tw More from this publisher
11.07.2015 Views

Prototypevoid OS_CREATECSEMA (OS_CSEMA* pCSema);ParameterDescriptionpCSemaTable 49: OS_CREATECSEMA() parameter listAdditional InformationTo create a counting semaphore, a data structure of the type OS_CSEMA needs to be defined in memory and initializedusing OS_CREATECSEMA(). The value of a semaphore created using this macro is zero. If, for any reason, you have tocreate a semaphore with an initial counting value above zero, use the function OS_CreateCSema().OS_CreateCSema()DescriptionCreates a counting semaphore with a specified initial count value.Prototypevoid OS_CreateCSema (OS_CSEMA*OS_UINTParameterDescriptionpCSemaInitValueTable 50: OS_CreateCSema() parameter listAdditional InformationpCSema,InitValue);To create a counting semaphore, a data structure of the type OS_CSEMA needs to be defined in memory and initializedusing OS_CreateCSema(). If the value of the created semaphore should be zero, the macro OS_CREATECSEMA()should be used.OS_SignalCSema()DescriptionIncrements the counter of a semaphore.Prototypevoid OS_SignalCSema (OS_CSEMA * pCSema);ParameterDescriptionpCSemaTable 51: OS_SignalCSema() parameter listAdditional InformationOS_SignalCSema() signals an event to a semaphore by incrementing its counter. If one or more tasks are waiting foran event to be signaled to this semaphore, the task that has the highest priority will become the active task. The countercan have a maximum value of 0xFFFF for 8/16-bit CPUs / 0xFFFFFFFF for 32-bit CPUs. It is the responsibility of theapplication to make sure that this limit will not be exceeded.OS_SignalCSemaMax()DescriptionPointer to a data structure of type OS_CSEMA.Pointer to a data structure of type OS_CSEMA.Initial count value of the semaphore:0

Counting SemaphoresPrototypevoid OS_SignalCSemaMax (OS_CSEMA* pCSema,OS_UINT MaxValue );ParameterDescriptionpCSemaPointer to a data structure of type OS_CSEMA.MaxValueLimit of semaphore count value.1

Prototypevoid OS_CREATECSEMA (OS_CSEMA* pCSema);ParameterDescriptionpCSemaTable 49: OS_CREATECSEMA() parameter listAdditional InformationTo create a counting semaphore, a data structure of the type OS_CSEMA needs to be defined in memory and initializedusing OS_CREATECSEMA(). The value of a semaphore created using this macro is zero. If, for any reason, you have tocreate a semaphore with an initial counting value above zero, use the function OS_CreateCSema().OS_CreateCSema()DescriptionCreates a counting semaphore with a specified initial count value.Prototypevoid OS_CreateCSema (OS_CSEMA*OS_UINTParameterDescriptionpCSemaInitValueTable 50: OS_CreateCSema() parameter listAdditional InformationpCSema,InitValue);To create a counting semaphore, a data structure of the type OS_CSEMA needs to be defined in memory and initializedusing OS_CreateCSema(). If the value of the created semaphore should be zero, the macro OS_CREATECSEMA()should be used.OS_SignalCSema()DescriptionIncrements the counter of a semaphore.Prototypevoid OS_SignalCSema (OS_CSEMA * pCSema);ParameterDescriptionpCSemaTable 51: OS_SignalCSema() parameter listAdditional InformationOS_SignalCSema() signals an event to a semaphore by incrementing its counter. If one or more tasks are waiting foran event to be signaled to this semaphore, the task that has the highest priority will become the active task. The countercan have a maximum value of 0xFFFF for 8/16-bit CPUs / 0xFFFFFFFF for 32-bit CPUs. It is the responsibility of theapplication to make sure that this limit will not be exceeded.OS_SignalCSemaMax()DescriptionPointer to a data structure of type OS_CSEMA.Pointer to a data structure of type OS_CSEMA.Initial count value of the semaphore:0

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

Saved successfully!

Ooh no, something went wrong!