Moved tests for dos.library functions into the 'dos' subdir.
[AROS.git] / rom / exec / attemptsemaphoreshared.c
blobdec782d1deaa7eabaada3fcef192d619bb6c5b8f
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Try to lock a semaphore shared.
6 Lang: english
7 */
9 #include <exec/semaphores.h>
10 #include <proto/exec.h>
12 #include "exec_intern.h"
13 #include "exec_util.h"
14 #include "semaphores.h"
16 /*****************************************************************************
18 NAME */
20 AROS_LH1(ULONG, AttemptSemaphoreShared,
22 /* SYNOPSIS */
23 AROS_LHA(struct SignalSemaphore *, sigSem, A0),
25 /* LOCATION */
26 struct ExecBase *, SysBase, 120, Exec)
28 /* FUNCTION
29 Tries to get a shared lock on a signal semaphore. If the lock cannot
30 be obtained false is returned. There may be more than one shared lock
31 at a time but an exclusive lock prevents all other locks. The lock
32 must be released with ReleaseSemaphore().
34 INPUTS
35 sigSem - pointer to semaphore structure
37 RESULT
38 True if the semaphore could be obtained, false otherwise.
40 NOTES
42 EXAMPLE
44 BUGS
46 SEE ALSO
47 ReleaseSemaphore()
49 INTERNALS
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 struct TraceLocation tp = CURRENT_LOCATION("AttemptSemaphoreShared");
57 return InternalAttemptSemaphore(sigSem, NULL, &tp, SysBase);
59 AROS_LIBFUNC_EXIT
60 } /* AttemptSemaphoreShared */