AROS

The Amiga Research OS


(C) Copyright 1996 AROS - The Amiga Research OS


6.7 IRQ HIDD

An IRQ HIDD is a frontend for the IRQ hardware of your computer. Whenever the computer generates an IRQ, the IRQ HIDD will catch it and check for handlers for this IRQ. If any handlers are available, the IRQ HIDD will call them.

An IRQ HIDD uses IRQ IDs to do it's job. Those IDs are not related to the IRQ numbers in the hardware.

An IRQ handler is a callback hook with a priority. The handler gets a pointer the handler info given to HIDDM_IRQ_AddHandler() and to the hardware specific IRQ data. For the format of this data, see the docs of the specific IRQ HIDD.

BOOL HIDDM_IRQ_AddHandler (HIDDT_IRQ_Handler * handlerInfo, ULONG id
) Install an handler for the ID id. If the handler could be installed, then TRUE is returned else FALSE. See the HIDDA_ErrorCode for details if FALSE was returned.

void HIDDM_IRQ_RemHandler (HIDDT_IRQ_Handler * handlerInfo)
Removes a handler. If the handler is running, this will block until the handler can be safely removed. If it is called from inside an IRQ, it will not block but postpone the remove.

void HIDDM_CauseIRQ (ULONG id, APTR hardwareInfo)
Generates a pseudo IRQ with the specified id. The hardwareInfo will be passed to the handlers instead of the normal hardware IRQ infos.

6.8 Internals

A HIDD is a normal Exec Device which creates a BOOPSI class when loaded. A HIDD is recognised by the name in the ROMtag structure. This name must begin with the four letters "HIDD" (in that order). Note that the name of the HIDD is the string after the first four letters. Also note that a HIDD need not have a unique name.

Every HIDD has an extended ROMtag structure which contains the infos needed to find a HIDD by HIDD_FindHIDD().

HIDDs are BOOPSI objects but unlike other BOOPSI objects, they are not created by classname but by the pointer returned by HIDD_FindHIDD().

6.9 Random unsorted ideas

The HIDD Tool Library (HIDDTL) must offer a way to make the process which wants to execute a method on the HIDD to wait if the HIDD is locked. It must also offer functions to lock/unlock a semaphore to allow the HIDD to block. If no locking is possible (eg. NetBSD), then there must be a way to query this, too.

There must be a set of functions to install IRQ handlers.


prev up next

If you have comments or suggestions, email me at digulla@aros.fh-konstanz.de. 24. Jul 1999