misc.library Reference¶
Comprehensive function reference for misc.library, synthesised from the AmigaOS NDK 3.2 Release 4 (Autodocs/AG/misc).
This page documents 2 functions of misc.library. Each function entry follows the canonical autodoc format. struct Name, union Name, enum Name are clickable links to the type definition in the types reference.
Function index¶
AllocMiscResource()¶
AllocMiscResource - allocate one of the miscelaneous resources
Synopsis
CurrentUser = AllocMiscResource( unitNum, name )
D0 D0 A1
char * AllocMiscResource(ULONG,char *);
Function
This routine attempts to allocate one of the miscellaneous resources If the resource had already been allocated, an error is returned. If you do get it, your name is associated with the resource (so a user can see who has it allocated).
This function may not be called from interrupt code
Inputs
unitNum - the number of the resource you want to allocate (eg. MR_SERIALBITS). name - a mnenonic name that will help the user figure out what piece of software is hogging a resource. (havoc breaks out if a name of null is passed in...)
Results
CurrentUser - if the resource is busy, then the name of the current user is returned. If the resource is free, then null is returned.
See also
FreeMiscResource()¶
FreeMiscResource - make a resource available for reallocation
Synopsis
FreeMiscResource( unitNum )
D0
void FreeMiscResource(ULONG);
Function
This routine frees one of the resources allocated by AllocMiscResource. The resource is made available for reuse.
FreeMiscResource must be called from the same task that
called AllocMiscResource. This function may not be called from
interrupt code.
Inputs
unitNum - the number of the miscellaneous resource to be freed.
Results
Frees the appropriate resource.
See also