Function ReleaseSemaphore

This function calls RTKSignalcReleaseCount times on the given counting semaphore. The value assigned to *lpPreviousCount is not reliable if other tasks are also using the semaphore at the time of this call.