OSTryWaitSemaphore

Syntax

#include <cafe/os.h>

s32  OSTryWaitSemaphore ( OSSemaphore* sem );

Parameters

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.

Do Not Call From

None.

See Also

OSInitSemaphore
OSGetSemaphoreCount
OSSignalSemaphore
OSWaitSemaphore

Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup pass.
2010/08/30 Initial version.


CONFIDENTIAL