Index: generic/include/proc/thread.h
===================================================================
--- generic/include/proc/thread.h	(revision 874621f88e11575154ad0c2e08fc906a8d92e4c0)
+++ generic/include/proc/thread.h	(revision 85d24f6104e1d4052c519b698e793a5b17168ab8)
@@ -47,4 +47,5 @@
 #define THREAD_STACK_SIZE	STACK_SIZE
 
+/**< Thread states. */
 enum state {
 	Invalid,	/**< It is an error, if thread is found in this state. */
@@ -58,4 +59,11 @@
 
 extern char *thread_states[];
+
+/**< Join types. */
+typedef enum {
+	None,
+	TaskClnp,	/**< The thread will be joined by ktaskclnp thread. */
+	TaskGC		/**< The thread will be joined by ktaskgc thread. */
+} thread_join_type_t;
 
 #define X_WIRED		(1<<0)
@@ -104,4 +112,5 @@
 	bool interrupted;			
 	
+	thread_join_type_t	join_type;	/**< Who joinins the thread. */
 	bool detached;				/**< If true, thread_join_timeout() cannot be used on this thread. */
 	waitq_t join_wq;			/**< Waitq for thread_join_timeout(). */
