home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name ivsense -- Detect an installed intervention function
- *
- * Synopsis pctrl = ivsense(pvectors,pident);
- *
- * IV_CTRL far *pctrl
- * Far pointer to the intervention control
- * block of the found function, or FARNIL
- * if the function is not found.
- * const IV_VECTORS far *pvectors
- * Address of structure containing
- * a set of interrupt vectors to examine.
- * const char far *pident
- * Address of array of 16 bytes of
- * identifying information
- *
- * Description This function examines the contents of memory pointed to
- * by a set of interrupt vectors to see whether it contains
- * a particular intervention control block. If so, the
- * function returns the address of the control block; if
- * not, the function returns FARNIL.
- *
- * The contents of the control block contain the
- * information required to disable the intervention
- * function and to remove the program containing it.
- *
- * The global variable b_ivmask lists the vectors that will
- * be examined for the presence of the intervention
- * function.
- *
- * Limitation This function assumes that the intervention filters were
- * the most recently installed handlers for their
- * respective interrupts. This function does NOT trace
- * chains of "cascaded" interrupt handlers. If the ISR
- * pointed to by any of the interrupt vectors does not
- * belong to the intervention function but merely passes
- * control to the intervention function, the intervention
- * function will not be found.
- *
- * You can partially overcome this limitation via IVDETECT,
- * which can detect an intervention control block even if
- * only one of its filters is exposed to direct examination
- * (i.e., not covered by other ISRs).
- *
- * Returns pctrl Far pointer to the intervention control
- * block of the found function, or FARNIL
- * if the function is not found.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1987,1989
- *
- **/
-
- #include <binterv.h>
- #include <butil.h>
-
- IV_CTRL far *ivsense(pvectors,pident)
- const IV_VECTORS far *pvectors;
- const char far *pident;
- {
- unsigned mask;
- IV_CTRL far *pctrl;
-
- return ((IV_NO_ERROR == ivdetect(pvectors,pident,&pctrl,&mask))
- ? pctrl
- : FARNIL);
- }