2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function AttemptLockLayerRom()
8 #include <graphics/clip.h>
9 #include <graphics/layers.h>
10 #include <proto/exec.h>
11 #include <exec/types.h>
13 #include "graphics_intern.h"
15 /*****************************************************************************
18 #include <proto/graphics.h>
20 AROS_LH1(BOOL
, AttemptLockLayerRom
,
23 AROS_LHA(struct Layer
*, l
, A5
),
26 struct GfxBase
*, GfxBase
, 109, Graphics
)
29 Try to lock the current layer. If it is already locked this
30 function will return FALSE, TRUE otherwise.
31 If the layer could be locked successfully nesting will take place
32 which means that for every successful locking of a layer
33 UnlockLayerRom() has to be called for that layer to let other
34 tasks access that layer.
40 TRUE - layer is successfully locked for the task
41 FALSE - layer could not be locked, it's locked by another task.
50 LockLayerRom(), UnlockLayerRom()
56 *****************************************************************************/
60 return AttemptSemaphore(&l
->Lock
);
63 } /* AttemptLockLayerRom */