From a961e1980c1674679b1090bb24630cf3de8d6b48 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 11 Jul 2017 08:48:15 +0200 Subject: Add interrupt server suspend/resume This mechanism can be used to safely move the interrupt server from one scheduler instance to another for example. Update #3071. --- cpukit/include/rtems/irq-extension.h | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'cpukit/include') diff --git a/cpukit/include/rtems/irq-extension.h b/cpukit/include/rtems/irq-extension.h index 0c72b6e086..4b49a1a078 100644 --- a/cpukit/include/rtems/irq-extension.h +++ b/cpukit/include/rtems/irq-extension.h @@ -361,6 +361,45 @@ rtems_status_code rtems_interrupt_server_handler_iterate( void *arg ); +/** + * @brief Suspends the specified interrupt server. + * + * A suspend request is sent to the specified interrupt server. This function + * waits for an acknowledgment from the specified interrupt server. + * + * This function must be called from thread context. It may block. Calling + * this function within the context of an interrupt server is undefined + * behaviour. + * + * @param[in] server_index The interrupt server index. Use + * @c RTEMS_INTERRUPT_SERVER_DEFAULT to specify the default server. + * + * @see rtems_interrupt_server_resume(). + * + * @retval RTEMS_SUCCESSFUL Successful operation + * @retval RTEMS_INCORRECT_STATE The interrupt servers are not initialized. + * @retval RTEMS_INVALID_ID If the interrupt server index is invalid. + */ +rtems_status_code rtems_interrupt_server_suspend( uint32_t server_index ); + +/** + * @brief Resumes the specified interrupt server. + * + * This function must be called from thread context. It may block. Calling + * this function within the context of an interrupt server is undefined + * behaviour. + * + * @param[in] server_index The interrupt server index. Use + * @c RTEMS_INTERRUPT_SERVER_DEFAULT to specify the default server. + * + * @see rtems_interrupt_server_suspend(). + * + * @retval RTEMS_SUCCESSFUL Successful operation + * @retval RTEMS_INCORRECT_STATE The interrupt servers are not initialized. + * @retval RTEMS_INVALID_ID If the interrupt server index is invalid. + */ +rtems_status_code rtems_interrupt_server_resume( uint32_t server_index ); + /** * @brief Initializes the specified interrupt server entry. * -- cgit v1.2.3