![]() |
Home |
|
Function RTKOpenSemaphoreExFunction RTKOpenSemaphoreEx creates or locates an existing semaphore: RTKSemaphore RTKOpenSemaphoreEx(RTKSemaType Type, unsigned InitialValue, unsigned long Flags, const char * Name, RTKBool * Created); ParametersTypeThe desired semaphore type. The following values are valid:
InitialValueMust be valid for the chosen semaphore type. For counting semaphores, this is 0 .. 232-1, for binary and event semaphores 0 or 1, and for resource/mutex semaphores it must be 1. FlagsSpecifies whether and how the function should search for an existing semaphore. It can take the following values:
NameParameter Name is a string of up to 15 characters length which can be displayed by functions RTKTaskInfo, RTKSemaInfo, and by error messages. By default, RTKernel-32 just copies the pointer to the name unless flag SF_COPY_NAME has been specified. CreatedAddress of a variable to receive value TRUE if a new semaphore has been created or FALSE if the function returns a reference to an existing semaphore. This parameter is optional and may be set to NULL. return valueA reference to the new or found semaphore.
|