OSTryWaitSemaphore

Syntax

#include <revolution/os.h>

s32  OSTryWaitSemaphore( OSSemaphore* sem );

Arguments

sem Pointer to a semaphore.

Return Values

The previous semaphore count. Decrementing the semaphore was successful if the return value is positive. Otherwise, semaphore status is unchanged.

Description

If the specified semaphore count is greater than zero, the count is decremented. Otherwise, this function returns without doing anything.

See Also

Thread Functions, Thread Synchronization Functions

Revision History

2006/03/01 Initial version.


CONFIDENTIAL