This function is declared in the kos/semaphore.h file.
Retcode KosSemaphoreInit(KosSemaphore *semaphore, unsigned count);
Initializes the defined semaphore with the initial count value.
The function returns the following:
semaphore points to an invalid semaphore;count value exceeds KOS_SEMAPHORE_VALUE_MAX.