Index: kernel/generic/include/ddi/irq.h
===================================================================
--- kernel/generic/include/ddi/irq.h	(revision 7dcf22a389ae4373e29fc2686bf9bae2ac3a8d39)
+++ kernel/generic/include/ddi/irq.h	(revision 63530c623718a69d8b980518b5dec7e17f4d991d)
@@ -38,4 +38,8 @@
 #include <arch/types.h>
 #include <adt/list.h>
+#include <ipc/ipc.h>
+#include <ipc/irq.h>
+#include <atomic.h>
+#include <synch/spinlock.h>
 
 typedef enum {
@@ -63,4 +67,11 @@
 	link_t link;
 
+	/** Lock protecting everything in this structure
+	 *  except the link member. When both the IRQ
+	 *  hash table lock and this lock are to be acquired,
+	 *  this lock must not be taken first.
+	 */
+	SPINLOCK_DECLARE(lock);
+
 	/** Unique device number. -1 if not yet assigned. */
 	devno_t devno;
@@ -68,6 +79,4 @@
 	/** Actual IRQ number. -1 if not yet assigned. */
 	inr_t inr;
-	/** Task ID of the task to be notified about the IRQ or 0. */
-	task_id_t notif;
 	/** Trigger level of the IRQ.*/
 	irq_trigger_t trigger;
@@ -78,4 +87,12 @@
 	/** Argument for the handler. */
 	void *arg;
+
+	/** Answerbox of the task that wanted to be notified. */
+	answerbox_t *notif_answerbox;
+	/** Pseudo-code to be performed by the top-half
+	 *  before a notification is sent. */
+	irq_code_t *code;
+	/** Counter of IRQ notifications. */
+	atomic_t counter;
 };
 
