Home |
RTTarget-32 Programming Manual System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) Function RTMPSendIPInterrupt Function RTMPTablePCIInterrupt |
Function RTMPSendIPInterruptRTMPSendIPInterrupt sends an Inter-Processor Interrupt (IPI) to one or several CPUs: UINT RTMPSendIPInterrupt(UINT Distribution, DWORD TargetCPU, UINT Type, UINT Vector); ParametersDistributionSpecifies how the target CPU(s) are selected. One of these values must be given:
TargetCPUIf parameter Distribution is set to RT_IPI_CPU, this parameter specifies the zero-based index of a CPU previously started with RTMPStartCPU to which the interrupt is sent. For all other Distribution values, this parameter is ignored and should be set to zero. TypeThis parameter is reserved and must be set to zero. VectorThe interrupt vector on which the interrupt shall be delivered. Values in the range 0 .. 255 are valid. return valueZero if sending the interrupt failed and non-zero otherwise. Sending IPIs is only supported in APIC mode, so this function will always fail in PIC mode. It may also return failure if the local APIC is busy for more than 80000 CPU cycles, the default timeout of this function. The receiving CPU(s) must handle the interrupt just like an I/O interrupt. However, IPIs are not associated with an IRQ. Thus, the handler should be installed on a vector not used by IRQs and the ISR must be installed with a function such as RTSetTrapVector or RTSetIntVector. The ISR should pass -1 to function RTIRQEnd when handling the interrupt is finished.
|