Index: kernel/generic/src/interrupt/interrupt.c
===================================================================
--- kernel/generic/src/interrupt/interrupt.c	(revision 63594c0852ded96012d0d14536f64726a4ca9b40)
+++ kernel/generic/src/interrupt/interrupt.c	(revision 6fc0eddfb616dfffd344e690afccee29596e0369)
@@ -209,6 +209,19 @@
 }
 
+/** Get istate structure of a thread.
+ *
+ * Get pointer to the istate structure at the bottom of the kernel stack.
+ *
+ * This function can be called in interrupt or user context. In interrupt
+ * context the istate structure is created by the low-level exception
+ * handler. In user context the istate structure is created by the
+ * low-level syscall handler.
+ */
 istate_t *istate_get(thread_t *thread)
 {
+	/*
+	 * The istate structure should be right at the bottom of the kernel
+	 * stack.
+	 */
 	return (istate_t *) ((uint8_t *) thread->kstack + THREAD_STACK_SIZE -
 	    sizeof(istate_t));
