2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function AttemptLockLayerRom()
8 /*****************************************************************************
11 #include <proto/graphics.h>
13 AROS_LH1(BOOL, AttemptLockLayerRom,
16 AROS_LHA(struct Layer *, l, A5),
19 struct GfxBase *, GfxBase, 109, Graphics)
22 Try to lock the current layer. If it is already locked this
23 function will return FALSE, TRUE otherwise.
24 If the layer could be locked successfully nesting will take place
25 which means that for every successful locking of a layer
26 UnlockLayerRom() has to be called for that layer to let other
27 tasks access that layer.
33 TRUE - layer is successfully locked for the task
34 FALSE - layer could not be locked, it's locked by another task.
43 LockLayerRom(), UnlockLayerRom()
49 *****************************************************************************/
50 #include "aros/m68k/asm.h"
54 .globl AROS_SLIB_ENTRY(AttemptLockLayerRom,Graphics,109)
56 AROS_SLIB_ENTRY(AttemptLockLayerRom,Graphics,109):
57 movem.l %d1/%a0-%a1/%a6,%sp@-
59 lea.l %a5@(ly_Lock),%a0
60 jsr %a6@(AttemptSemaphore)
61 movem.l %sp@+,%d1/%a0-%a1/%a6