Index: abi/include/bool.h
===================================================================
--- abi/include/bool.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
+++ abi/include/bool.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2011 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef ABI_BOOL_H_
+#define ABI_BOOL_H_
+
+typedef uint8_t bool;
+
+#endif
+
+/** @}
+ */
Index: abi/include/proc/task.h
===================================================================
--- abi/include/proc/task.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
+++ abi/include/proc/task.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2006 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericproc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef ABI_PROC_TASK_H_
+#define ABI_PROC_TASK_H_
+
+typedef uint64_t task_id_t;
+
+#endif
+
+/** @}
+ */
Index: abi/include/proc/thread.h
===================================================================
--- abi/include/proc/thread.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
+++ abi/include/proc/thread.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2006 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericproc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef ABI_PROC_THREAD_H_
+#define ABI_PROC_THREAD_H_
+
+typedef uint64_t thread_id_t;
+
+/** 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;
+
+#endif
+
+/** @}
+ */
Index: abi/include/syscall.h
===================================================================
--- abi/include/syscall.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ abi/include/syscall.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -89,5 +89,5 @@
 	SYS_UNREGISTER_IRQ,
 	
-	SYS_SYSINFO_GET_TAG,
+	SYS_SYSINFO_GET_VAL_TYPE,
 	SYS_SYSINFO_GET_VALUE,
 	SYS_SYSINFO_GET_DATA_SIZE,
Index: abi/include/sysinfo.h
===================================================================
--- abi/include/sysinfo.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ abi/include/sysinfo.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -37,4 +37,7 @@
 #define ABI_SYSINFO_H_
 
+#include <abi/proc/task.h>
+#include <abi/proc/thread.h>
+
 /** Number of load components */
 #define LOAD_STEPS  3
@@ -44,21 +47,14 @@
 #define EXC_NAME_BUFLEN   20
 
-/** Thread states */
+/** Item value type
+ *
+ */
 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;
+	SYSINFO_VAL_UNDEFINED = 0,     /**< Undefined value */
+	SYSINFO_VAL_VAL = 1,           /**< Constant numeric value */
+	SYSINFO_VAL_DATA = 2,          /**< Constant binary data */
+	SYSINFO_VAL_FUNCTION_VAL = 3,  /**< Generated numeric value */
+	SYSINFO_VAL_FUNCTION_DATA = 4  /**< Generated binary data */
+} sysinfo_item_val_type_t;
 
 /** Statistics about a single CPU
Index: kernel/generic/include/ipc/ipc.h
===================================================================
--- kernel/generic/include/ipc/ipc.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ kernel/generic/include/ipc/ipc.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -36,8 +36,9 @@
 #define KERN_IPC_H_
 
-#include <abi/ipc/ipc.h>
 #include <synch/spinlock.h>
 #include <synch/mutex.h>
 #include <synch/waitq.h>
+#include <abi/ipc/ipc.h>
+#include <abi/proc/task.h>
 #include <typedefs.h>
 
Index: kernel/generic/include/sysinfo/sysinfo.h
===================================================================
--- kernel/generic/include/sysinfo/sysinfo.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ kernel/generic/include/sysinfo/sysinfo.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -38,18 +38,8 @@
 #include <typedefs.h>
 #include <str.h>
+#include <abi/sysinfo.h>
 
 /** Framebuffer info exported flags */
 extern bool fb_exported;
-
-/** Item value type
- *
- */
-typedef enum {
-	SYSINFO_VAL_UNDEFINED = 0,     /**< Undefined value */
-	SYSINFO_VAL_VAL = 1,           /**< Constant numeric value */
-	SYSINFO_VAL_DATA = 2,          /**< Constant binary data */
-	SYSINFO_VAL_FUNCTION_VAL = 3,  /**< Generated numeric value */
-	SYSINFO_VAL_FUNCTION_DATA = 4  /**< Generated binary data */
-} sysinfo_item_val_type_t;
 
 /** Subtree type
@@ -145,5 +135,5 @@
 extern void sysinfo_dump(sysinfo_item_t *);
 
-extern sysarg_t sys_sysinfo_get_tag(void *, size_t);
+extern sysarg_t sys_sysinfo_get_val_type(void *, size_t);
 extern sysarg_t sys_sysinfo_get_value(void *, size_t, void *);
 extern sysarg_t sys_sysinfo_get_data_size(void *, size_t, void *);
Index: kernel/generic/include/typedefs.h
===================================================================
--- kernel/generic/include/typedefs.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ kernel/generic/include/typedefs.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -39,4 +39,5 @@
 #include <arch/common.h>
 #include <arch/types.h>
+#include <abi/bool.h>
 
 #define NULL  ((void *) 0)
@@ -61,7 +62,4 @@
 typedef void (* function)();
 
-typedef uint8_t bool;
-typedef uint64_t thread_id_t;
-typedef uint64_t task_id_t;
 typedef uint32_t container_id_t;
 
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ kernel/generic/src/syscall/syscall.c	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -181,5 +181,5 @@
 	
 	/* Sysinfo syscalls. */
-	(syshandler_t) sys_sysinfo_get_tag,
+	(syshandler_t) sys_sysinfo_get_val_type,
 	(syshandler_t) sys_sysinfo_get_value,
 	(syshandler_t) sys_sysinfo_get_data_size,
Index: kernel/generic/src/sysinfo/sysinfo.c
===================================================================
--- kernel/generic/src/sysinfo/sysinfo.c	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ kernel/generic/src/sysinfo/sysinfo.c	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -661,5 +661,5 @@
  *
  */
-sysarg_t sys_sysinfo_get_tag(void *path_ptr, size_t path_size)
+sysarg_t sys_sysinfo_get_val_type(void *path_ptr, size_t path_size)
 {
 	/*
Index: uspace/app/sysinfo/sysinfo.c
===================================================================
--- uspace/app/sysinfo/sysinfo.c	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/app/sysinfo/sysinfo.c	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -51,5 +51,5 @@
 	int rc;
 	char *ipath;
-	sysinfo_item_tag_t tag;
+	sysinfo_item_val_type_t tag;
 
 	if (argc != 2) {
@@ -60,5 +60,5 @@
 	ipath = argv[1];
 
-	tag = sysinfo_get_tag(ipath);
+	tag = sysinfo_get_val_type(ipath);
 
 	/* Silence warning */
@@ -75,4 +75,9 @@
 	case SYSINFO_VAL_DATA:
 		rc = print_item_data(ipath);
+		break;
+	default:
+		printf("Error: Sysinfo item '%s' with unknown value type.\n",
+		    ipath);
+		rc = 2;
 		break;
 	}
Index: uspace/app/trace/syscalls.c
===================================================================
--- uspace/app/trace/syscalls.c	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/app/trace/syscalls.c	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -75,5 +75,5 @@
     [SYS_UNREGISTER_IRQ] = { "unregister_irq",	2,	V_ERRNO },
 
-    [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag",		2,	V_INTEGER },
+    [SYS_SYSINFO_GET_VAL_TYPE] = { "sysinfo_get_val_type",		2,	V_INTEGER },
     [SYS_SYSINFO_GET_VALUE] = { "sysinfo_get_value",		3,	V_ERRNO },
     [SYS_SYSINFO_GET_DATA_SIZE] = { "sysinfo_get_data_size",	3,	V_ERRNO },
Index: uspace/lib/c/generic/sysinfo.c
===================================================================
--- uspace/lib/c/generic/sysinfo.c	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/lib/c/generic/sysinfo.c	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -47,7 +47,7 @@
  *
  */
-sysinfo_item_tag_t sysinfo_get_tag(const char *path)
+sysinfo_item_val_type_t sysinfo_get_val_type(const char *path)
 {
-	return (sysinfo_item_tag_t) __SYSCALL2(SYS_SYSINFO_GET_TAG,
+	return (sysinfo_item_val_type_t) __SYSCALL2(SYS_SYSINFO_GET_VAL_TYPE,
 	    (sysarg_t) path, (sysarg_t) str_size(path));
 }
Index: uspace/lib/c/include/bool.h
===================================================================
--- uspace/lib/c/include/bool.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/lib/c/include/bool.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -37,9 +37,8 @@
 
 #include <libarch/types.h>
+#include <abi/bool.h>
 
 #define false  0
 #define true   1
-
-typedef uint8_t bool;
 
 #endif
Index: uspace/lib/c/include/sysinfo.h
===================================================================
--- uspace/lib/c/include/sysinfo.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/lib/c/include/sysinfo.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -36,16 +36,9 @@
 #define LIBC_SYSINFO_H_
 
-#include <libc.h>
+#include <sys/types.h>
+#include <bool.h>
+#include <abi/sysinfo.h>
 
-/** Sysinfo value types
- *
- */
-typedef enum {
-	SYSINFO_VAL_UNDEFINED = 0,
-	SYSINFO_VAL_VAL = 1,
-	SYSINFO_VAL_DATA = 2
-} sysinfo_item_tag_t;
-
-extern sysinfo_item_tag_t sysinfo_get_tag(const char *);
+extern sysinfo_item_val_type_t sysinfo_get_val_type(const char *);
 extern int sysinfo_get_value(const char *, sysarg_t *);
 extern void *sysinfo_get_data(const char *, size_t *);
Index: uspace/lib/c/include/task.h
===================================================================
--- uspace/lib/c/include/task.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/lib/c/include/task.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -37,6 +37,5 @@
 
 #include <sys/types.h>
-
-typedef uint64_t task_id_t;
+#include <abi/proc/task.h>
 
 typedef enum {
Index: uspace/lib/c/include/thread.h
===================================================================
--- uspace/lib/c/include/thread.h	(revision dc6b1488002a77ead533c7f3333fec8d6503cc42)
+++ uspace/lib/c/include/thread.h	(revision 9a426d1f629f275455938b21d553365bb5146fb0)
@@ -38,6 +38,5 @@
 #include <libarch/thread.h>
 #include <sys/types.h>
-
-typedef uint64_t thread_id_t;
+#include <abi/proc/thread.h>
 
 extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *);
