tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / hyperlayers / locklayer.c
bloba85450bf1ea29b88065c561cfbac11d2b8f06538
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <proto/exec.h>
11 #define DEBUG 0
12 #include <aros/debug.h>
13 #undef kprintf
15 /*****************************************************************************
17 NAME */
18 #include <proto/layers.h>
19 #include "layers_intern.h"
21 AROS_LH2(void, LockLayer,
23 /* SYNOPSIS */
24 AROS_LHA(LONG , dummy, A0),
25 AROS_LHA(struct Layer *, layer, A1),
27 /* LOCATION */
28 struct LayersBase *, LayersBase, 16, Layers)
30 /* FUNCTION
31 Locks a layer for exclusive access by this task.
32 A layer can be locked multiple times but has to be unlocked
33 as many times as it has been locked so that other tasks
34 can access it.
36 INPUTS
37 dummy - unused.
38 layer - pointer to layer to be locked
40 RESULT
42 NOTES
44 EXAMPLE
46 BUGS
48 SEE ALSO
50 INTERNALS
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 D(bug("LockLayer(layer @ $%lx)\n", layer));
58 ObtainSemaphore(&layer->Lock);
60 AROS_LIBFUNC_EXIT
61 } /* LockLayer */