From 33ed4123c0f3e6193beb8d6a22d46c9983d0df79 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 20 Sep 2019 09:16:17 +0200 Subject: 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. --- cpukit/include/rtems/irq-extension.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'cpukit/include/rtems/irq-extension.h') diff --git a/cpukit/include/rtems/irq-extension.h b/cpukit/include/rtems/irq-extension.h index 28030c2181..122901d796 100644 --- a/cpukit/include/rtems/irq-extension.h +++ b/cpukit/include/rtems/irq-extension.h @@ -9,7 +9,7 @@ /* * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette. * - * Copyright (c) 2008, 2017 embedded brains GmbH. + * Copyright (C) 2008, 2019 embedded brains GmbH * * embedded brains GmbH * Dornierstr. 4 @@ -560,6 +560,28 @@ void rtems_interrupt_server_entry_submit( rtems_interrupt_server_entry *entry ); +/** + * @brief Moves the interrupt server entry to the specified destination + * interrupt server. + * + * Calling this function concurrently with rtems_interrupt_server_entry_submit() + * with the same entry or while the entry is enqueued on the previous interrupt + * server is undefined behaviour. + * + * @param[in,out] entry The interrupt server entry. It must have be initialized + * before the call to this function. + * @param destination_server_index The destination interrupt server index. + * Use @c RTEMS_INTERRUPT_SERVER_DEFAULT to specify the default server. + * + * @retval RTEMS_SUCCESSFUL Successful operation + * @retval RTEMS_INCORRECT_STATE The interrupt servers are not initialized. + * @retval RTEMS_INVALID_ID The destination interrupt server index is invalid. + */ +rtems_status_code rtems_interrupt_server_entry_move( + rtems_interrupt_server_entry *entry, + uint32_t destination_server_index +); + /** * @brief Destroys the specified interrupt server entry. * -- cgit v1.2.3