tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / graphics / attemptlocklayerrom.c
blobb5653aaf7efe51d5e0cd06a9cd12aa98ff690f63
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function AttemptLockLayerRom()
6 Lang: english
7 */
8 #include <graphics/clip.h>
9 #include <graphics/layers.h>
10 #include <proto/exec.h>
11 #include <exec/types.h>
13 #include "graphics_intern.h"
15 /*****************************************************************************
17 NAME */
18 #include <proto/graphics.h>
20 AROS_LH1(BOOL, AttemptLockLayerRom,
22 /* SYNOPSIS */
23 AROS_LHA(struct Layer *, l, A5),
25 /* LOCATION */
26 struct GfxBase *, GfxBase, 109, Graphics)
28 /* FUNCTION
29 Try to lock the current layer. If it is already locked this
30 function will return FALSE, TRUE otherwise.
31 If the layer could be locked successfully nesting will take place
32 which means that for every successful locking of a layer
33 UnlockLayerRom() has to be called for that layer to let other
34 tasks access that layer.
36 INPUTS
37 l - pointer to layer
39 RESULT
40 TRUE - layer is successfully locked for the task
41 FALSE - layer could not be locked, it's locked by another task.
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
50 LockLayerRom(), UnlockLayerRom()
52 INTERNALS
54 HISTORY
56 *****************************************************************************/
58 AROS_LIBFUNC_INIT
60 return AttemptSemaphore(&l->Lock);
62 AROS_LIBFUNC_EXIT
63 } /* AttemptLockLayerRom */