summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/irq-extension.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-20 09:16:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-20 09:22:46 +0200
commit33ed4123c0f3e6193beb8d6a22d46c9983d0df79 (patch)
tree1fd0434cef45c7412f9ebc581eb4ad76ecf9d0b0 /cpukit/include/rtems/irq-extension.h
parentbsps/beagle: register i2c device at initialization (diff)
downloadrtems-33ed4123c0f3e6193beb8d6a22d46c9983d0df79.tar.bz2
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.
Diffstat (limited to 'cpukit/include/rtems/irq-extension.h')
-rw-r--r--cpukit/include/rtems/irq-extension.h24
1 files changed, 23 insertions, 1 deletions
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
@@ -561,6 +561,28 @@ void rtems_interrupt_server_entry_submit(
);
/**
+ * @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.
*
* This function must be called from thread context. It may block. Calling