r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / graphics / locklayerrom.c
blob8aa8fd7f40b57a2aab70f36a33b8cf8507a86ce0
1 /*
2 Copyright © 1995-2001, 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() LockLayer() UnLockLayer()
51 INTERNALS
53 HISTORY
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
58 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
60 ObtainSemaphore(&l->Lock);
62 AROS_LIBFUNC_EXIT
63 } /* LockLayerRom */