Dmitry Adamushko wrote: > Hi, > > the previous version contained an ugly bug, namely the misuse of the > test_and_set/clear_bit interface > that led to a broken system from time to time. >
And here is a tiny patch to make RTDM shared-IRQ-aware. If you release another version before a merge, you may include it into your patch. Note that I struggled a bit with finding the right prefix. I decided to separate the namespaces of return flags and creation flags - hopefully in a reasonable manner. Jan
Index: ksrc/skins/rtdm/drvlib.c
===================================================================
--- ksrc/skins/rtdm/drvlib.c (revision 503)
+++ ksrc/skins/rtdm/drvlib.c (working copy)
@@ -1200,7 +1200,7 @@
* @param[in,out] irq_handle IRQ handle
* @param[in] irq_no Line number of the addressed IRQ
* @param[in] handler Interrupt handler
- * @param[in] flags Currently unused, pass 0
+ * @param[in] flags Registration flags, see @ref RTDM_IRQTYPE_xxx for details
* @param[in] device_name Optional device name to show up in real-time IRQ
* lists (not yet implemented)
* @param[in] arg Pointer to be passed to the interrupt handler on invocation
Index: include/rtdm/rtdm_driver.h
===================================================================
--- include/rtdm/rtdm_driver.h (revision 503)
+++ include/rtdm/rtdm_driver.h (working copy)
@@ -693,6 +693,15 @@
typedef xnintr_t rtdm_irq_t;
+/*!
+ * @anchor RTDM_IRQTYPE_xxx @name RTDM_IRQTYPE_xxx
+ * Interrupt registrations flags
+ * @{
+ */
+/** Enable IRQ-sharing with other real-time drivers */
+#define RTDM_IRQTYPE_SHARED XN_ISR_SHARED
+/** @} */
+
/**
* Interrupt handler
*
@@ -702,7 +711,6 @@
*/
typedef int (*rtdm_irq_handler_t)(rtdm_irq_t *irq_handle);
-
/*!
* @anchor RTDM_IRQ_xxx @name RTDM_IRQ_xxx
* Return flags of interrupt handlers
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-core mailing list [email protected] https://mail.gna.org/listinfo/xenomai-core
