[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


NAME
   AllocUnit - allocate a unit of the disk

SYNOPSIS
   Success = AllocUnit( unitNum ), DRResource
    D0                   D0         A6

    BOOL AllocUnit(LONG);

FUNCTION
    This routine allocates one of the units of the disk.  It should
    be called before trying to use the disk (via GetUnit).

    In reality, it is perfectly fine to use GetUnit/GiveUnit if AllocUnit
    fails.  Do NOT call FreeUnit if AllocUnit did not succeed.  This
    has been the case for all revisions of disk.resource.

INPUTS
    unitNum -- a legal unit number (zero through three)

RESULTS
    Success -- nonzero if successful.  zero on failure.

EXCEPTIONS

SEE ALSO

BUGS


[Back to Amiga Developer Docs]