2 Copyright © 1995-2007, 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
)
31 Lock a portion of a file for exclusive access. A timeout may be specified
32 which is the maximum amount of time to wait for the record to be available.
36 fh -- file handle for the file to lock a record of
37 offset -- starting position of the lock
38 length -- length of the record in bytes
40 timeout -- timeout interval measured in ticks (may be 0)
44 Success/failure indicator.
48 Record locks are cooperative, meaning that they only affect other calls
57 LockRecords(), UnLockRecord()
61 *****************************************************************************/
66 struct FileHandle
*fileH
= BADDR(fh
);
73 status
= dopacket5(DOSBase
, NULL
, fileH
->fh_Type
, ACTION_LOCK_RECORD
, fileH
->fh_Arg1
, offset
, length
, mode
, timeout
);