2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
9 #include "dos_intern.h"
10 #include <proto/exec.h>
12 /*****************************************************************************
15 #include <proto/dos.h>
17 AROS_LH5(BOOL
, LockRecord
,
20 AROS_LHA(BPTR
, fh
, D1
),
21 AROS_LHA(ULONG
, offset
, D2
),
22 AROS_LHA(ULONG
, length
, D3
),
23 AROS_LHA(ULONG
, mode
, D4
),
24 AROS_LHA(ULONG
, timeout
, D5
),
27 struct DosLibrary
*, DOSBase
, 45, Dos
)
30 Lock a portion of a file for exclusive access. A timeout may be
31 specified which is the maximum amount of time to wait for the record
35 fh - file handle for the file to lock a record of
36 offset - starting position of the lock
37 length - length of the record in bytes
39 timeout - timeout interval measured in ticks (may be 0)
42 Success/failure indicator.
45 Record locks are cooperative, meaning that they only affect other calls
53 LockRecords(), UnLockRecord()
57 *****************************************************************************/
62 struct FileHandle
*fileH
= BADDR(fh
);
69 status
= dopacket5(DOSBase
, NULL
, fileH
->fh_Type
, ACTION_LOCK_RECORD
, fileH
->fh_Arg1
, offset
, length
, mode
, timeout
);