Home  /  Autodocs  /  exec.library

NAME

AttemptSemaphore
try to obtain without blocking

SYNOPSIS

success = AttemptSemaphore(signalSemaphore)
D0 A0

LONG AttemptSemaphore(struct SignalSemaphore *);

FUNCTION

This call is similar to ObtainSemaphore(), except that it will not block if the semaphore could not be locked.

NOTES

This call does NOT preserve registers.

INPUTS

signalSemaphore
an initialized signal semaphore structure

RESULT

success
TRUE if the semaphore was locked, false if some other Task already possessed the semaphore.

SEE ALSO

ObtainSemaphore() ObtainSemaphoreShared(), ReleaseSemaphore(), "exec/semaphores.i", <exec/semaphores.h>