Changes

362 bytes added ,  20:28, 16 November 2016
Line 331: Line 331:     
Base class for interrupt events.
 
Base class for interrupt events.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Type
 +
!  Description
 +
|-
 +
| 0x0
 +
| void **
 +
| Pointer to vtable
 +
|-
 +
| 0x4
 +
| u32
 +
| Unknown
 +
|}
 +
 +
The first method in the table is <code>KInterruptEvent* InterruptEvent::getKInterruptEvent(u32 interruptID)</code>. It's actually the function called by the IRQ handler, which returns a [[KInterruptEvent|KInterruptEvent]] to signal.
 +
If NULL or 1 is returned, no event will be signaled. If NULL is returned, no post-interrupt rescheduling will be done.
 +
 +
The second method is <code>void InterruptEvent::signalEvent(void)</code>, which signals the associated [[KEvent|KEvent]] object.
    
The kernel uses the [[KInterruptEvent|KInterruptEvent]] field of a [[KEvent|KEvent]] when binding public interrupts per svcBindInterrupt request, whereas it internally uses a static object of another subclass to bind interrupt 0x0F (FIQ abstraction).
 
The kernel uses the [[KInterruptEvent|KInterruptEvent]] field of a [[KEvent|KEvent]] when binding public interrupts per svcBindInterrupt request, whereas it internally uses a static object of another subclass to bind interrupt 0x0F (FIQ abstraction).
  −
The first first word in the object is a pointer to the object's vtable and the first function in the vtable is the interrupt handler for that interrupt number. When an interrupt runs, the function is passed its object in r0 and the interrupt number in r1.