rtems: Add rtems_interrupt_server_entry_move()

The use case for this function is the libbsd.  In FreeBSD, the interrupt
setup and binding to a processor is done in two steps.  Message
based interrupts like PCIe MSI and MSI-X interrupts can be implemented
through interrupt server entries.  They are setup at the default
interrupt server and may optionally move to an interrupt server bound to
a specific processor.
This commit is contained in:
Sebastian Huber
2019-09-20 09:16:17 +02:00
parent a4e96cfb0a
commit 33ed4123c0
2 changed files with 40 additions and 1 deletions

View File

@@ -638,6 +638,23 @@ void rtems_interrupt_server_entry_submit(
bsp_interrupt_server_trigger(entry);
}
rtems_status_code rtems_interrupt_server_entry_move(
rtems_interrupt_server_entry *entry,
uint32_t destination_server_index
)
{
rtems_status_code sc;
bsp_interrupt_server_context *s;
s = bsp_interrupt_server_get_context(destination_server_index, &sc);
if (s == NULL) {
return sc;
}
entry->server = s;
return RTEMS_SUCCESSFUL;
}
static void bsp_interrupt_server_entry_synchronize_helper(void *arg)
{
bsp_interrupt_server_helper_data *hd = arg;