On 18/07/2018 12:48, Michael Walle wrote:
/**
+ * get_irq_latched:
+ * @num: Interrupt to observe.
+ *
+ * Returns: The latched level of the @num interrupt.
+ */
+static inline bool get_irq_latched(int num)
+{
+ return qtest_get_irq_latched(global_qtest, num);
+}
+
+/**
+ * clear_irq_latch:
+ * @num: Interrupt to operate on.
+ *
+ * Clears the latch of the @num interrupt.
+ */
+static inline void clear_irq_latch(int num)
+{
+ return qtest_clear_irq_latch(global_qtest, num);
+}
+
+/**
* irq_intercept_in:
* @string: QOM path of a device.
*
Just one thing, I think an atomic test-and-clear is a better API. I
understand that what you have works, because
get_irq_latched+clear_irq_latch don't have any intervening access to
the
qtest socket.