Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Enumerations
Variables
Constants
Functions and Procedures
Identifiers

Unit kdinterrupt

Description

Unit kdinterrupt contains implementations and accompanying definitions for most of classes relevant to hardware interrupt handling, such as: TkdInterrupt, TkdInterruptAcknowledgement and TkdInterruptPipe.

Classes, Interfaces and Objects

NameDescription
Class TkdInterruptFinal resource class TkdInterrupt models hardware interrupts. This basic interrupt managing class includes members for specifying a particular interrupt and all information for that interrupt acknowledgement, binding to that interrupt the common interrupt service routine (ISR) located inside the GDD and running in the privileged mode and a user-defined interrupt event handler established through the inter-spatial interrupt-bearing pipe between kernel and user spaces. There are proper reversing methods for unbinding the ISR from that interrupt and destroying the pipe instance. The class also includes several statistical members such as properties for obtaining system times at whose two recent interrupts are generated and properties for calculating the whole number of interrupts generated and directed to a user-defined interrupt event handler, if established. Each instance of this class contains singular instance of TkdInterruptPipe class, the former is being completely responsible for creation, activation, synchronization and destruction of the pipe encapsulated. Each instance of this class can also hold the whole set of interrupt acknowledgement actions, each of which is modelled by TkdInterruptAcknowledgement class. Although TkdInterrupt class has dozens of methods and properties, including those intended merely for design-time work, relevant members are documented only.
Class TkdInterruptAcknowledgementComplementary resource class TkdInterruptAcknowledgement models a single hardware interrupt acknowledgement action belonging to the whole hardware interrupt acknowledgement session. Each instance of this class is hosted at InterruptAcknowledgement list-oriented property and can be attached to and detached from it by AddInterruptAcknowledgement and DeleteInterruptAcknowledgement methods of the paternal instance of TkdInterrupt class. Concerning hardware interrupt acknowledgement, this class involves only a classic solution in the form of accessing a required hardware register related to some address range of hardware. It includes properties for specifying: a particular operation to undertake as a part of the whole acknowledgement session, a particular hardware register that has to be accessed , a particular value that has to be written to the register if the writing operation is specified. The whole acknowledgement session often consists of one or more serial acknowledgement actions. If your card's interrupt acknowledgement scheme can not be established by using the abilities of this class only, InterruptHandler property of the paternal instance of TkdInterrupt class with the outside documentation is at your disposal. Hardware interrupt acknowledgement with this class is only allowable and actual if the interrupt type specified is level-sensitive (PCI interrupt).
Class TkdInterruptPipeComplementary class TkdInterruptPipe models the inter-spatial interrupt-bearing pipe between the GDD and the user-defined interrupt event handler. The class is constructively a CLX-based system thread initially fallen asleep and awakened by the GDD whenever a new hardware interrupt or a small group of frequent interrupts is generated. This is the time at that OnHwInterrupt event of the paternal instance of TkdInterrupt class is fired and the user-defined interrupt event handler established is run. Various interrupt-related data is also moves up to the user space to become accessible straight in a Kylix application via several statistical members of the paternal instance of TkdInterrupt class, such: as InterruptsGenerated, InterruptsDirected, InterruptLastTime, InterruptPreviousTime properties. The functional core of this class is accommodated in its Execute method overridden.

Types

Overview

PInterruptHandlerInstruction = ^TInterruptHandlerInstruction
p_TInterruptHandlerInstructionsArray = ^t_TInterruptHandlerInstructionsArray
TAddNewInsnProc = function(insn: PInterruptHandlerInstruction): Integer of object
TEnqueueStringProc = function(strng: PChar): Integer of object
TInterruptHandlerInstruction = record opcode: Byte; regnum: Byte; arg16: Word; arg32: LongWord end
TkdInterruptHandler = procedure (Sender: TkdInterrupt) of object
t_TInterruptHandlerInstructionsArray = array of TInterruptHandlerInstruction

Description

PInterruptHandlerInstruction = ^TInterruptHandlerInstruction

PInterruptHandlerInstruction = ^TInterruptHandlerInstruction;

p_TInterruptHandlerInstructionsArray = ^t_TInterruptHandlerInstructionsArray

p_TInterruptHandlerInstructionsArray = ^t_TInterruptHandlerInstructionsArray;

TAddNewInsnProc = function(insn: PInterruptHandlerInstruction): Integer of object

TAddNewInsnProc = function(insn: PInterruptHandlerInstruction): Integer of object;

TEnqueueStringProc = function(strng: PChar): Integer of object

TEnqueueStringProc = function(strng: PChar): Integer of object;

TInterruptHandlerInstruction = record opcode: Byte; regnum: Byte; arg16: Word; arg32: LongWord end

TInterruptHandlerInstruction = record opcode: Byte; regnum: Byte; arg16: Word; arg32: LongWord end;

TkdInterruptHandler = procedure (Sender: TkdInterrupt) of object

TkdInterruptHandler = procedure (Sender: TkdInterrupt) of object;

t_TInterruptHandlerInstructionsArray = array of TInterruptHandlerInstruction

t_TInterruptHandlerInstructionsArray = array of TInterruptHandlerInstruction;

Enumerations

TkdInterruptAcknowledgementAction
TkdInterruptAcknowledgementAction = (aaRead, aaWrite);
 aaRead 
 aaWrite 
TkdInterruptAutoRequest
TkdInterruptAutoRequest = (arCheckOnly, arInstall, arNone);
 arCheckOnly 
 arInstall 
 arNone 
TkdInterruptHandlerType
TkdInterruptHandlerType = (htSlow, htFast);
 htSlow 
 htFast 
TkdInterruptInterruptType
TkdInterruptInterruptType = (itEdgeTriggered, itLevelSensitive);
 itEdgeTriggered 
 itLevelSensitive 

Author

ETSoft Tenzor.Net (etsoft@tenzor.net)

Created

01 May 2004

Last Modified

05 February 2005