Index: kernel/generic/include/ipc/event.h
===================================================================
--- kernel/generic/include/ipc/event.h	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/include/ipc/event.h	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -51,26 +51,29 @@
 	/** Counter. */
 	size_t counter;
+	/** Masked flag. */
+	bool masked;
 } event_t;
 
 extern void event_init(void);
-extern sysarg_t sys_event_subscribe(sysarg_t, sysarg_t);
-extern bool event_is_subscribed(event_type_t);
 extern void event_cleanup_answerbox(answerbox_t *);
 
-#define event_notify_0(e) \
-	event_notify((e), 0, 0, 0, 0, 0)
-#define event_notify_1(e, a1) \
-	event_notify((e), (a1), 0, 0, 0, 0)
-#define event_notify_2(e, a1, a2) \
-	event_notify((e), (a1), (a2), 0, 0, 0)
-#define event_notify_3(e, a1, a2, a3) \
-	event_notify((e), (a1), (a2), (a3), 0, 0)
-#define event_notify_4(e, a1, a2, a3, a4) \
-	event_notify((e), (a1), (a2), (a3), (a4), 0)
-#define event_notify_5(e, a1, a2, a3, a4, a5) \
-	event_notify((e), (a1), (a2), (a3), (a4), (a5))
+#define event_notify_0(e, m) \
+	event_notify((e), (m), 0, 0, 0, 0, 0)
+#define event_notify_1(e, m, a1) \
+	event_notify((e), (m), (a1), 0, 0, 0, 0)
+#define event_notify_2(e, m, a1, a2) \
+	event_notify((e), (m), (a1), (a2), 0, 0, 0)
+#define event_notify_3(e, m, a1, a2, a3) \
+	event_notify((e), (m), (a1), (a2), (a3), 0, 0)
+#define event_notify_4(e, m, a1, a2, a3, a4) \
+	event_notify((e), (m), (a1), (a2), (a3), (a4), 0)
+#define event_notify_5(e, m, a1, a2, a3, a4, a5) \
+	event_notify((e), (m), (a1), (a2), (a3), (a4), (a5))
 
-extern void event_notify(event_type_t, sysarg_t, sysarg_t, sysarg_t,
+extern int event_notify(event_type_t, bool, sysarg_t, sysarg_t, sysarg_t,
     sysarg_t, sysarg_t);
+
+extern sysarg_t sys_event_subscribe(sysarg_t, sysarg_t);
+extern sysarg_t sys_event_unmask(sysarg_t);
 
 #endif
Index: kernel/generic/include/ipc/event_types.h
===================================================================
--- kernel/generic/include/ipc/event_types.h	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/include/ipc/event_types.h	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -39,5 +39,5 @@
 	/** New data available in kernel log */
 	EVENT_KLOG = 0,
-	/** Returning from kernel console to userspace */
+	/** Returning from kernel console to uspace */
 	EVENT_KCONSOLE,
 	/** A task/thread has faulted and will be terminated */
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/include/syscall/syscall.h	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -75,4 +75,5 @@
 	
 	SYS_EVENT_SUBSCRIBE,
+	SYS_EVENT_UNMASK,
 	
 	SYS_CAP_GRANT,
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/src/console/cmd.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -1107,5 +1107,5 @@
 	release_console();
 	
-	event_notify_0(EVENT_KCONSOLE);
+	event_notify_0(EVENT_KCONSOLE, false);
 	indev_pop_character(stdin);
 	
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/src/console/console.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -265,7 +265,8 @@
 	spinlock_lock(&klog_lock);
 	
-	if ((klog_inited) && (event_is_subscribed(EVENT_KLOG)) && (klog_uspace > 0)) {
-		event_notify_3(EVENT_KLOG, klog_start, klog_len, klog_uspace);
-		klog_uspace = 0;
+	if ((klog_inited) && (klog_uspace > 0)) {
+		if (event_notify_3(EVENT_KLOG, true, klog_start, klog_len,
+		    klog_uspace) == EOK)
+			klog_uspace = 0;
 	}
 	
Index: kernel/generic/src/ipc/event.c
===================================================================
--- kernel/generic/src/ipc/event.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/src/ipc/event.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -48,22 +48,120 @@
 static event_t events[EVENT_END];
 
-/** Initialize kernel events. */
+/** Initialize kernel events.
+ *
+ */
 void event_init(void)
 {
-	unsigned int i;
-	
-	for (i = 0; i < EVENT_END; i++) {
+	for (unsigned int i = 0; i < EVENT_END; i++) {
 		spinlock_initialize(&events[i].lock, "event.lock");
 		events[i].answerbox = NULL;
 		events[i].counter = 0;
 		events[i].imethod = 0;
+		events[i].masked = false;
 	}
 }
 
+/** Unsubscribe kernel events associated with an answerbox
+ *
+ * @param answerbox Answerbox to be unsubscribed.
+ *
+ */
+void event_cleanup_answerbox(answerbox_t *answerbox)
+{
+	for (unsigned int i = 0; i < EVENT_END; i++) {
+		spinlock_lock(&events[i].lock);
+		
+		if (events[i].answerbox == answerbox) {
+			events[i].answerbox = NULL;
+			events[i].counter = 0;
+			events[i].imethod = 0;
+			events[i].masked = false;
+		}
+		
+		spinlock_unlock(&events[i].lock);
+	}
+}
+
+/** Send kernel notification event
+ *
+ * @param evno Event type.
+ * @param mask Mask further notifications after a successful
+ *             sending.
+ * @param a1   First argument.
+ * @param a2   Second argument.
+ * @param a3   Third argument.
+ * @param a4   Fourth argument.
+ * @param a5   Fifth argument.
+ *
+ * @return EOK if notification was successfully sent.
+ * @return ENOMEM if the notification IPC message failed to allocate.
+ * @return EBUSY if the notifications of the given type are
+ *         currently masked.
+ * @return ENOENT if the notifications of the given type are
+ *         currently not subscribed.
+ *
+ */
+int event_notify(event_type_t evno, bool mask, sysarg_t a1, sysarg_t a2,
+    sysarg_t a3, sysarg_t a4, sysarg_t a5)
+{
+	ASSERT(evno < EVENT_END);
+	
+	spinlock_lock(&events[evno].lock);
+	
+	int ret;
+	
+	if (events[evno].answerbox != NULL) {
+		if (!events[evno].masked) {
+			call_t *call = ipc_call_alloc(FRAME_ATOMIC);
+			
+			if (call) {
+				call->flags |= IPC_CALL_NOTIF;
+				call->priv = ++events[evno].counter;
+				
+				IPC_SET_IMETHOD(call->data, events[evno].imethod);
+				IPC_SET_ARG1(call->data, a1);
+				IPC_SET_ARG2(call->data, a2);
+				IPC_SET_ARG3(call->data, a3);
+				IPC_SET_ARG4(call->data, a4);
+				IPC_SET_ARG5(call->data, a5);
+				
+				irq_spinlock_lock(&events[evno].answerbox->irq_lock, true);
+				list_append(&call->link, &events[evno].answerbox->irq_notifs);
+				irq_spinlock_unlock(&events[evno].answerbox->irq_lock, true);
+				
+				waitq_wakeup(&events[evno].answerbox->wq, WAKEUP_FIRST);
+				
+				if (mask)
+					events[evno].masked = true;
+				
+				ret = EOK;
+			} else
+				ret = ENOMEM;
+		} else
+			ret = EBUSY;
+	} else
+		ret = ENOENT;
+	
+	spinlock_unlock(&events[evno].lock);
+	
+	return ret;
+}
+
+/** Subscribe event notifications
+ *
+ * @param evno      Event type.
+ * @param imethod   IPC interface and method to be used for
+ *                  the notifications.
+ * @param answerbox Answerbox to send the notifications to.
+ *
+ * @return EOK if the subscription was successful.
+ * @return EEXISTS if the notifications of the given type are
+ *         already subscribed.
+ *
+ */
 static int event_subscribe(event_type_t evno, sysarg_t imethod,
     answerbox_t *answerbox)
 {
-	if (evno >= EVENT_END)
-		return ELIMIT;
+	ASSERT(evno < EVENT_END);
 	
 	spinlock_lock(&events[evno].lock);
@@ -75,4 +173,5 @@
 		events[evno].imethod = imethod;
 		events[evno].counter = 0;
+		events[evno].masked = false;
 		res = EOK;
 	} else
@@ -84,65 +183,59 @@
 }
 
+/** Unmask event notifications
+ *
+ * @param evno Event type to unmask.
+ *
+ */
+static void event_unmask(event_type_t evno)
+{
+	ASSERT(evno < EVENT_END);
+	
+	spinlock_lock(&events[evno].lock);
+	events[evno].masked = false;
+	spinlock_unlock(&events[evno].lock);
+}
+
+/** Event notification syscall wrapper
+ *
+ * @param evno    Event type to subscribe.
+ * @param imethod IPC interface and method to be used for
+ *                the notifications.
+ *
+ * @return EOK on success.
+ * @return ELIMIT on unknown event type.
+ * @return EEXISTS if the notifications of the given type are
+ *         already subscribed.
+ *
+ */
 sysarg_t sys_event_subscribe(sysarg_t evno, sysarg_t imethod)
 {
+	if (evno >= EVENT_END)
+		return ELIMIT;
+	
 	return (sysarg_t) event_subscribe((event_type_t) evno, (sysarg_t)
 	    imethod, &TASK->answerbox);
 }
 
-bool event_is_subscribed(event_type_t evno)
-{
-	bool res;
-	
-	ASSERT(evno < EVENT_END);
-	
-	spinlock_lock(&events[evno].lock);
-	res = events[evno].answerbox != NULL;
-	spinlock_unlock(&events[evno].lock);
-	
-	return res;
-}
-
-
-void event_cleanup_answerbox(answerbox_t *answerbox)
-{
-	unsigned int i;
-	
-	for (i = 0; i < EVENT_END; i++) {
-		spinlock_lock(&events[i].lock);
-		if (events[i].answerbox == answerbox) {
-			events[i].answerbox = NULL;
-			events[i].counter = 0;
-			events[i].imethod = 0;
-		}
-		spinlock_unlock(&events[i].lock);
-	}
-}
-
-void event_notify(event_type_t evno, sysarg_t a1, sysarg_t a2, sysarg_t a3,
-    sysarg_t a4, sysarg_t a5)
-{
-	ASSERT(evno < EVENT_END);
-	
-	spinlock_lock(&events[evno].lock);
-	if (events[evno].answerbox != NULL) {
-		call_t *call = ipc_call_alloc(FRAME_ATOMIC);
-		if (call) {
-			call->flags |= IPC_CALL_NOTIF;
-			call->priv = ++events[evno].counter;
-			IPC_SET_IMETHOD(call->data, events[evno].imethod);
-			IPC_SET_ARG1(call->data, a1);
-			IPC_SET_ARG2(call->data, a2);
-			IPC_SET_ARG3(call->data, a3);
-			IPC_SET_ARG4(call->data, a4);
-			IPC_SET_ARG5(call->data, a5);
-			
-			irq_spinlock_lock(&events[evno].answerbox->irq_lock, true);
-			list_append(&call->link, &events[evno].answerbox->irq_notifs);
-			irq_spinlock_unlock(&events[evno].answerbox->irq_lock, true);
-			
-			waitq_wakeup(&events[evno].answerbox->wq, WAKEUP_FIRST);
-		}
-	}
-	spinlock_unlock(&events[evno].lock);
+/** Event notification unmask syscall wrapper
+ *
+ * Note that currently no tests are performed whether the calling
+ * task is entitled to unmask the notifications. However, thanks
+ * to the fact that notification masking is only a performance
+ * optimization, this has probably no security implications.
+ *
+ * @param evno Event type to unmask.
+ *
+ * @return EOK on success.
+ * @return ELIMIT on unknown event type.
+ *
+ */
+sysarg_t sys_event_unmask(sysarg_t evno)
+{
+	if (evno >= EVENT_END)
+		return ELIMIT;
+	
+	event_unmask((event_type_t) evno);
+	return EOK;
 }
 
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/src/proc/task.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -534,9 +534,7 @@
 	*/
 	if (notify) {
-		if (event_is_subscribed(EVENT_FAULT)) {
-			/* Notify the subscriber that a fault occurred. */
-			event_notify_3(EVENT_FAULT, LOWER32(TASK->taskid),
-			    UPPER32(TASK->taskid), (sysarg_t) THREAD);
-		
+		/* Notify the subscriber that a fault occurred. */
+		if (event_notify_3(EVENT_FAULT, false, LOWER32(TASK->taskid),
+		    UPPER32(TASK->taskid), (sysarg_t) THREAD) == EOK) {
 #ifdef CONFIG_UDEBUG
 			/* Wait for a debugging session. */
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ kernel/generic/src/syscall/syscall.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -161,4 +161,5 @@
 	/* Event notification syscalls. */
 	(syshandler_t) sys_event_subscribe,
+	(syshandler_t) sys_event_unmask,
 	
 	/* Capabilities related syscalls. */
Index: uspace/app/klog/klog.c
===================================================================
--- uspace/app/klog/klog.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ uspace/app/klog/klog.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -74,4 +74,6 @@
 		fsync(fileno(log));
 	}
+	
+	event_unmask(EVENT_KLOG);
 }
 
@@ -111,11 +113,4 @@
 	}
 	
-	rc = event_subscribe(EVENT_KLOG, 0);
-	if (rc != EOK) {
-		fprintf(stderr, "%s: Unable to register klog notifications\n",
-		    NAME);
-		return rc;
-	}
-	
 	log = fopen(LOG_FNAME, "a");
 	if (log == NULL)
@@ -124,4 +119,14 @@
 	
 	async_set_interrupt_received(interrupt_received);
+	rc = event_subscribe(EVENT_KLOG, 0);
+	if (rc != EOK) {
+		fclose(log);
+		fprintf(stderr, "%s: Unable to register klog notifications\n",
+		    NAME);
+		return rc;
+	}
+	
+	event_unmask(EVENT_KLOG);
+	
 	klog_update();
 	async_manager();
Index: uspace/lib/c/generic/event.c
===================================================================
--- uspace/lib/c/generic/event.c	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ uspace/lib/c/generic/event.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -41,14 +41,28 @@
 #include <kernel/ipc/event_types.h>
 
-/** Subscribe for event notifications.
+/** Subscribe event notifications.
  *
- * @param evno   Event number.
- * @param method Use this method for notifying me.
+ * @param evno    Event type to subscribe.
+ * @param imethod Use this interface and method for notifying me.
  *
  * @return Value returned by the kernel.
+ *
  */
-int event_subscribe(event_type_t e, sysarg_t method)
+int event_subscribe(event_type_t evno, sysarg_t imethod)
 {
-	return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) e, (sysarg_t) method);
+	return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) evno,
+	    (sysarg_t) imethod);
+}
+
+/** Unmask event notifications.
+ *
+ * @param evno Event type to unmask.
+ *
+ * @return Value returned by the kernel.
+ *
+ */
+int event_unmask(event_type_t evno)
+{
+	return __SYSCALL1(SYS_EVENT_UNMASK, (sysarg_t) evno);
 }
 
Index: uspace/lib/c/include/event.h
===================================================================
--- uspace/lib/c/include/event.h	(revision e0f52bf734d3ec774636ecbab7cd664786001b5c)
+++ uspace/lib/c/include/event.h	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -39,4 +39,5 @@
 
 extern int event_subscribe(event_type_t, sysarg_t);
+extern int event_unmask(event_type_t);
 
 #endif
