2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
8 #include <aros/libcall.h>
9 #include <proto/exec.h>
12 #include <aros/debug.h>
15 /*****************************************************************************
18 #include <proto/layers.h>
19 #include "layers_intern.h"
21 AROS_LH2(void, LockLayer
,
24 AROS_LHA(LONG
, dummy
, A0
),
25 AROS_LHA(struct Layer
*, layer
, A1
),
28 struct LayersBase
*, LayersBase
, 16, Layers
)
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
38 layer - pointer to layer to be locked
52 *****************************************************************************/
56 D(bug("LockLayer(layer @ $%lx)\n", layer
));
58 ObtainSemaphore(&layer
->Lock
);