Index: src/libcfa/concurrency/alarm.h
===================================================================
--- src/libcfa/concurrency/alarm.h	(revision 6cff9f347a3ec63c988f50d069c0d23f371b346a)
+++ src/libcfa/concurrency/alarm.h	(revision fea3faac1cd99d58dc1dd738883cfb602a81f178)
@@ -18,15 +18,30 @@
 #define ALARM_H
 
+#include <stdbool.h>
+
 #include "assert"
 
-typedef unsigned long int cfa_time_t;
+typedef unsigned long int __cfa_time_t;
 
 struct thread_desc;
 struct processor;
 
+//=============================================================================================
+// Clock logic
+//=============================================================================================
+
+#define TIMEGRAN 1_000_000_000L				// nanosecond granularity, except for timeval
+
+__cfa_time_t __kernel_get_time();
+void __kernel_set_timer( __cfa_time_t alarm );
+
+//=============================================================================================
+// Alarm logic
+//=============================================================================================
+
 struct alarm_node_t {
-	cfa_time_t alarm;		// time when alarm goes off
-	cfa_time_t period;	// if > 0 => period of alarm
-	alarm_node_t * next;	// intrusive link list field
+	__cfa_time_t alarm;		// time when alarm goes off
+	__cfa_time_t period;		// if > 0 => period of alarm
+	alarm_node_t * next;		// intrusive link list field
 
 	union {
@@ -34,10 +49,14 @@
 		processor * proc;		// proc who created event
 	};
+
+	bool set		:1;		// whether or not the alarm has be registered
+	bool kernel_alarm	:1;		// true if this is not a user defined alarm
 };
 
 typedef alarm_node_t ** __alarm_it_t;
 
-void ?{}( alarm_node_t * this, thread_desc * thrd, cfa_time_t alarm, cfa_time_t period = 0 );
-void ?{}( alarm_node_t * this, processor   * proc, cfa_time_t alarm, cfa_time_t period = 0 );
+void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = 0, __cfa_time_t period = 0 );
+void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = 0, __cfa_time_t period = 0 );
+void ^?{}( alarm_node_t * this );
 
 struct alarm_list_t {
@@ -54,4 +73,7 @@
 alarm_node_t * pop( alarm_list_t * this );
 
+void register_self  ( alarm_node_t * this );
+void unregister_self( alarm_node_t * this );
+
 #endif
 
