| M E M _ O B T A I N H O T V E C ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English
AMIGA - MEM_#?
----------------------------------------------------------------------------
NAME
mem_obtainhotvec() - Obtains hot vector by taking its
id value.
SYNOPSIS
vec = mem_obtainhotvec(id, ent);
__saveds __interrupt LONG **mem_obtainhotvec(
ULONG, LONG);
FUNCTION
This function resolves "hot vector" by its unique id.
INPUTS
id - Hot vec. id as assigned in 'mem_attachhotvec()'.
ent - Vector number to obtain. You will want to pass
0 so that top of array can be accessed but you
may like to code overlaid hot vectors that grow
so in that case you may want to poll for newly
attached hot vector of the same id.
RETURNS
Hot vec. address or NULL on miss or when array is out
of range.
BASES
[SysBase]
NOTES
This routine does not reference global 'SysBase' thus
it should be safe to use it anywhere in your process.
Even though function is safe to call from interrupts
it will most likely not be able to resolve hot vector
if this interrupt was not caused by your task.
This function blocks task switching at the time of id
test.
SEE ALSO
mem_attachhotvec(), mem_attachrelhotvec(),
mem_detachhotvec(), mem_obtainrelhotvec(),
mem_resolvehotvec()
EXAMPLE
...
LONG **vec;
/*
* Try to obtain 3rd(0, 1, 2) vector of this hot vec.
*/
if ((vec = mem_obtainhotvec(0x00400000, 2)))
{
/*
* Go to top of an array of vectors and check 0 vec.
*/
vec -= 2;
if (*vec)
{
...
}
}
...
BUGS
None known.
----------------------------------------------------------------------------
| |
| |