1st attempt of Zunification of BHFormat.
[cake.git] / rom / hyperlayers / locklayer.c
blob7ccfa60bf8f1436efbc459fb697bee8607561861
1 /*
2 Copyright © 1995-2007, 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 layer - pointer to layer to be locked
39 RESULT
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 HISTORY
52 27-11-96 digulla automatically created from
53 layers_lib.fd and clib/layers_protos.h
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 D(bug("LockLayer(layer @ $%lx)\n", layer));
61 ObtainSemaphore(&layer->Lock);
63 AROS_LIBFUNC_EXIT
64 } /* LockLayer */