Index: kernel/generic/include/proc/thread.h
===================================================================
--- kernel/generic/include/proc/thread.h	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
+++ kernel/generic/include/proc/thread.h	(revision bd01a4e2eea1f1c2d0ae1323bcebe495b503e8a1)
@@ -48,4 +48,5 @@
 #include <proc/uarg.h>
 #include <udebug/udebug.h>
+#include <sysinfo/abi.h>
 
 #define THREAD_STACK_SIZE	STACK_SIZE
@@ -69,22 +70,4 @@
 #define THREAD_FLAG_NOATTACH	(1 << 3)
 
-/** Thread states. */
-typedef enum {
-	/** It is an error, if thread is found in this state. */
-	Invalid,
-	/** State of a thread that is currently executing on some CPU. */
-	Running,
-	/** Thread in this state is waiting for an event. */
-	Sleeping,
-	/** State of threads in a run queue. */
-	Ready,
-	/** Threads are in this state before they are first readied. */
-	Entering,
-	/** After a thread calls thread_exit(), it is put into Exiting state. */
-	Exiting,
-	/** Threads that were not detached but exited are Lingering. */
-	Lingering
-} state_t;
-
 /** Thread structure. There is one per thread. */
 typedef struct thread {
@@ -253,4 +236,5 @@
 extern void thread_print_list(void);
 extern void thread_destroy(thread_t *);
+extern thread_t *thread_find_by_id(thread_id_t);
 extern void thread_update_accounting(bool);
 extern bool thread_exists(thread_t *);
