Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileFxattr()Dlock() GEMDOSSyntaxLONG Dlock( mode, drv )
WORD mode, drv;
Function Dlock() locks a BIOS disk device against GEMDOS usage.
Opcode 309 (0x135)
Availability Available when a 'MiNT' cookie with a version of at least
0.93 exists.
Parameters Setting mode to DRV_LOCK (1) places a lock on BIOS device
drv whereas a mode setting of DRV_UNLOCK (0) unlocks drv.
Binding move.w drv,-(sp)
move.w mode,-(sp)
move.w #$135,-(sp)
trap #1
addq.l #6,sp
Return Value Dlock() returns 0 if successful or a negative GEMDOS error
code otherwise.
Comments Locking a device provides a method for device formatters to
prevent other processes from simultaneously attempting to
access a drive. If a process which locked a device
terminates, that device is automatically unlocked. BIOS device numbers and GEMDOS drive letters do not necessarily
have a one to one correspondence. To lock a GEMDOS drive use
Fxattr() to determine the device number of the drive you
wish to lock.
See Also Fxattr()