Commit of the code which was suggested by Georg as a fix for:
[cake.git] / rom / dos / unlockdoslist.c
blobb0039549a1ab574423100ee1e71551a5307570d6
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/debug.h>
9 #include <proto/exec.h>
10 #include "dos_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/dos.h>
17 AROS_LH1(void, UnLockDosList,
19 /* SYNOPSIS */
20 AROS_LHA(ULONG, flags, D1),
22 /* LOCATION */
23 struct DosLibrary *, DOSBase, 110, Dos)
25 /* FUNCTION
26 Frees a lock on the dos lists given by LockDosList().
28 INPUTS
29 flags - the same value as given to LockDosList().
31 RESULT
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 HISTORY
44 04-06-07 sonic - imported back from MorphOS source code
45 - removed Permit()
46 29-10-95 digulla automatically created from
47 dos_lib.fd and clib/dos_protos.h
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct DosInfo *di = BADDR(DOSBase->dl_Root->rn_Info);
55 D(bug("UnLockDosList: flags = $%lx\n", flags));
57 if (flags & LDF_ALL)
58 ReleaseSemaphore(&di->di_DevLock);
60 if (flags & LDF_ENTRY)
61 ReleaseSemaphore(&di->di_EntryLock);
63 if (flags & LDF_DELETE)
64 ReleaseSemaphore(&di->di_DeleteLock);
66 /* This came from MorphOS. Left for reference.
67 Permit(); */
69 AROS_LIBFUNC_EXIT
70 } /* UnLockDosList */