Bringing flexcat 2.15 into the main branch (again)
[AROS.git] / arch / m68k-amiga / graphics / unlocklayerrom.S
blob7f6af7ff267e4558de94dbd419433dbb6fd206bc
1 /*
2     Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3     $Id$
5     Desc: Graphics function UnlockLayerRom()
6     Lang: english
7 */
8 /*****************************************************************************
10     NAME
11 #include <proto/graphics.h>
13         AROS_LH1(void, UnlockLayerRom,
15     SYNOPSIS
16         AROS_LHA(struct Layer *, l,   A5),
18     LOCATION
19         struct GfxBase *, GfxBase, 73, Graphics)
21     FUNCTION
22         Unlocks a previously locked layer for access by other applications
23         or intuition itself.
24         If a task has locked a layer multiple times it must unlock it
25         as many times as well as locks nest.
26         This functions does the same as layers/UnlockLayerRom()
28     INPUTS
29         l - pointer to layer structure
31     RESULT
33     NOTES
35     EXAMPLE
37     BUGS
38         Does not save all registers.
40     SEE ALSO
41         LockLayerRom(), hyperlayers.library/LockLayer()
42         hyperlayers.library/UnLockLayer()
44     INTERNALS
46     HISTORY
48 *****************************************************************************/
49         #include "aros/m68k/asm.h"
51         .text
52         .balign 2
53         .globl  AROS_SLIB_ENTRY(UnlockLayerRom,Graphics,73)
55 AROS_SLIB_ENTRY(UnlockLayerRom,Graphics,73):
56     move.l  %a6,%sp@-
57     move.l  SysBase,%a6
58     lea.l   %a5@(ly_Lock),%a0
59     jsr     %a6@(ReleaseSemaphore)
60     move.l  %sp@+,%a6
61     rts