OSTryWaitSemaphore

C Specification

#include <revolution/os.h>
s32  OSTryWaitSemaphore ( OSSemaphore* sem );

Arguments

sem Pointer to a semaphore.

Return Values

Previous semaphore count. A positive return value indicates that decrementing the semaphore was successful. Otherwise, the semaphore status is unchanged.

Description

If the semaphore count is greater than zero, the count is decremented. Otherwise, this function returns without taking any action.

See Also

Thread Functions, Thread Synchronization Functions

Revision History

2006/03/01 Initial version.


CONFIDENTIAL