revert between 56095 -> 55830 in arch
[AROS.git] / rom / dos / unlockrecord.c
blob8bdf93bf6cd5c38acf009619878841e51cff8ef4
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include "dos_intern.h"
10 #include <proto/exec.h>
12 /*****************************************************************************
14 NAME */
15 #include <proto/dos.h>
17 AROS_LH3(BOOL, UnLockRecord,
19 /* SYNOPSIS */
20 AROS_LHA(BPTR , fh, D1),
21 AROS_LHA(ULONG, offset, D2),
22 AROS_LHA(ULONG, length, D3),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 47, Dos)
27 /* FUNCTION
28 Release a lock made with LockRecord().
30 INPUTS
31 fh - filehandle the lock was made on
32 offset - starting position of the lock
33 length - length of the record in bytes
35 RESULT
37 NOTES
38 The length and offset must match the corresponding LockRecord()
39 call.
41 EXAMPLE
43 BUGS
45 SEE ALSO
46 LockRecord(), UnLockRecords()
48 INTERNALS
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 LONG status;
55 struct FileHandle *fileH = BADDR(fh);
57 if (fh == BNULL)
59 return DOSFALSE;
62 status = dopacket3(DOSBase, NULL, fileH->fh_Type, ACTION_FREE_RECORD, fileH->fh_Arg1, offset, length);
64 return status;
66 AROS_LIBFUNC_EXIT
67 } /* UnLockRecord */