RtGetPciMsixFreeMessages
RtGetPciMsixFreeMessages returns a PCI device’s MSI-X free messages (the MSI-X table entries available for attaching messages).
NOTE: RtGetPciMsixFreeMessages is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX64.
Syntax
ULONG RtGetPciMsixFreeMessages( ULONG BusNumber, PCI_SLOT_NUMBER SlotNumber, ULONG *TotalMessagesInCapability, BYTE *FreeMessageIdBitMap );
Parameters
BusNumber
The bus the device is on in a multiple bus environment, with the count starting at zero.
SlotNumber
The logical slot number. This is a PCI_SLOT_NUMBER type value.
TotalMessagesInCapability
A pointer to ULONG variable. If non-NULL, it stores the number of MSI-X table entries in the device’s MSI-X capability. FreeMessageIdBitMap buffer needs to be allocated according to this size.
FreeMessageIdBitMap
A pointer to the user allocated buffer. If non-NULL, it stores the device’s MSI-X free messages.
The value stored is a bit map. The offset of each setting bit represents a free MessageId, which is the index of MSI-X table entry available for attaching a message.
Return Value
Returns the number of MSI-X table entries available for attaching messages if the function succeeds; returns 0 if the function fails.
Remarks
To determine the FreeMessageIdBitMap buffer size, call RtGetPciMsixFreeMessages with parameter FreeMessageIdBitMap set to NULL. The returning value in TotalMessagesInCapability is the number of bits required for the bit map buffer to allocate.
We recommend calling RtGetPciMsixFreeMessages to get the device’s MSI-X free messages before calling RtAttachInterrupt with AttachVersion as ATTACH_MESSAGE_BASED_MULTI_VECTOR.
See the MultiVectorI350 sample for an example use of the RtGetPciMsixFreeMessages function.
Requirements
Minimum Supported Version | RTX64 3.3 |
Header | RtssApi.h |
Library | Rtx_Rtss.lib |
See Also: