Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / graphics / locklayerrom.c
blob1cb06b9f6f6db83613a761a80bf925eb2f5db03f
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function LockLayerRom()
6 Lang: english
7 */
8 #include <proto/layers.h>
9 #include <proto/exec.h>
10 #include <graphics/clip.h>
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH1(void, LockLayerRom,
19 /* SYNOPSIS */
20 AROS_LHA(struct Layer *, l, A5),
22 /* LOCATION */
23 struct GfxBase *, GfxBase, 72, Graphics)
25 /* FUNCTION
26 Locks the layer. Returns when the layer is locked for
27 exclusive use.
28 This call behaves like when a semaphore is locked. The
29 same task may lock the same layer several times without
30 locking itself out. For every call to this function a
31 call to UnlockLayerRom() has to be made as the calls nest.
32 This function will also prevent intuition from locking the
33 layer so the layer should not be blocked too long.
34 This function does exactly the same as layers/LockLayer()
36 INPUTS
37 l - pointer to layer that is to be locked
39 RESULT
41 NOTES
43 EXAMPLE
45 BUGS
46 Does not save all registers.
48 SEE ALSO
49 UnlockLayerRom(), hyperlayers.library/LockLayer()
50 hyperlayers.library/UnLockLayer()
52 INTERNALS
54 HISTORY
56 *****************************************************************************/
58 AROS_LIBFUNC_INIT
60 ObtainSemaphore(&l->Lock);
62 AROS_LIBFUNC_EXIT
63 } /* LockLayerRom */