Index: kernel/generic/include/mm/frame.h
===================================================================
--- kernel/generic/include/mm/frame.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ kernel/generic/include/mm/frame.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -169,11 +169,11 @@
 extern bool zone_merge(size_t, size_t);
 extern void zone_merge_all(void);
-extern uint64_t zone_total_size(void);
-extern void zone_busy_and_free(uint64_t *out_busy, uint64_t *out_free);
+extern uint64_t zones_total_size(void);
+extern void zones_stats(uint64_t *, uint64_t *, uint64_t *, uint64_t *);
 
 /*
  * Console functions
  */
-extern void zone_print_list(void);
+extern void zones_print_list(void);
 extern void zone_print_one(size_t);
 
Index: kernel/generic/include/proc/task.h
===================================================================
--- kernel/generic/include/proc/task.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ kernel/generic/include/proc/task.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -56,6 +56,5 @@
 #include <ipc/kbox.h>
 #include <mm/as.h>
-
-#include <ps/taskinfo.h>
+#include <sysinfo/abi.h>
 
 struct thread;
@@ -81,5 +80,5 @@
 	task_id_t taskid;
 	/** Task security context. */
-	context_id_t context;	
+	context_id_t context;
 
 	/** Number of references (i.e. threads). */
@@ -89,10 +88,10 @@
 
 	/** Task capabilities. */
-	cap_t capabilities;	
+	cap_t capabilities;
 
 	/* IPC stuff */
 	answerbox_t answerbox;  /**< Communication endpoint */
 	phone_t phones[IPC_MAX_PHONES];
-	task_ipc_info_t ipc_info; /**< IPC statistics */
+	stats_ipc_t ipc_info;   /**< IPC statistics */
 	/**
 	 * Active asynchronous messages. It is used for limiting uspace to
@@ -120,5 +119,5 @@
 	mutex_t futexes_lock;
 	/** B+tree of futexes referenced by this task. */
-	btree_t futexes;	
+	btree_t futexes;
 	
 	/** Accumulated accounting. */
Index: kernel/generic/include/proc/thread.h
===================================================================
--- kernel/generic/include/proc/thread.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ kernel/generic/include/proc/thread.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -69,6 +69,21 @@
 #define THREAD_FLAG_NOATTACH	(1 << 3)
 
-/* We need state_t enum definition */
-#include <ps/taskinfo.h>
+/** 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. */
Index: kernel/generic/include/ps/cpuinfo.h
===================================================================
--- kernel/generic/include/ps/cpuinfo.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * 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 KERN_PS_CPU_H_
-#define KERN_PS_CPU_H_
-
-typedef struct {
-	unsigned int id;
-	uint16_t frequency_mhz;
-	uint64_t idle_ticks;
-	uint64_t busy_ticks;
-} uspace_cpu_info_t;
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/ps/load.h
===================================================================
--- kernel/generic/include/ps/load.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * 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 KERN_PS_LOAD_H_
-#define KERN_PS_LOAD_H_
-
-extern void get_avenrun(unsigned long *loads, int shift);
-extern void kload_thread(void *);
-extern int sys_ps_get_load(unsigned long *user_load);
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/ps/meminfo.h
===================================================================
--- kernel/generic/include/ps/meminfo.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * 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 KERN_PS_MEM_H_
-#define KERN_PS_MEM_H_
-
-#ifdef KERNEL
-#include <typedefs.h>
-#else
-#include <thread.h>
-#endif
-
-typedef struct {
-	uint64_t total;
-	uint64_t used;
-	uint64_t free;
-} uspace_mem_info_t;
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/ps/ps.h
===================================================================
--- kernel/generic/include/ps/ps.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * 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 KERN_PS_PS_H_
-#define KERN_PS_PS_H_
-
-#include <ps/taskinfo.h>
-#include <ps/cpuinfo.h>
-#include <ps/meminfo.h>
-
-extern size_t sys_ps_get_tasks(task_id_t *uspace_ids, size_t size);
-extern int sys_ps_get_task_info(task_id_t *uspace_id, task_info_t *uspace_info);
-extern int sys_ps_get_threads(thread_info_t *uspace_infos, size_t size);
-extern int sys_ps_get_cpu_info(uspace_cpu_info_t *uspace_cpu);
-extern int sys_ps_get_mem_info(uspace_mem_info_t *mem_info);
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/ps/taskinfo.h
===================================================================
--- kernel/generic/include/ps/taskinfo.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * 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 taskinfo.h		Contains all thread and task defs common for
- * 				kernel and uspace.
- */
-
-#ifndef KERN_PS_TASKINFO_H_
-#define KERN_PS_TASKINFO_H_
-
-#ifdef KERNEL
-#include <typedefs.h>
-#else
-#include <thread.h>
-#endif
-
-#define TASK_NAME_BUFLEN	20
-
-typedef struct {
-	uint64_t call_sent;
-	uint64_t call_recieved;
-	uint64_t answer_sent;
-	uint64_t answer_recieved;
-	uint64_t irq_notif_recieved;
-	uint64_t forwarded;
-} task_ipc_info_t;
-
-typedef struct {
-	task_id_t taskid;
-	char name[TASK_NAME_BUFLEN];
-	uint64_t virt_mem;
-	int thread_count;
-	uint64_t ucycles;
-	uint64_t kcycles;
-	task_ipc_info_t ipc_info;
-} task_info_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;
-
-typedef struct {
-	thread_id_t tid;
-	task_id_t taskid;
-	state_t state;
-	int priority;
-	uint64_t ucycles;
-	uint64_t kcycles;
-	unsigned int cpu;
-} thread_info_t;
-
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/ps/uptime.h
===================================================================
--- kernel/generic/include/ps/uptime.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * Copyright (c) 2010 Stanislav Kozina
- * 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 KERN_PS_UPTIME_H_
-#define KERN_PS_UPTIME_H_
-
-extern int sys_ps_get_uptime(uint64_t *user_load);
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ kernel/generic/include/syscall/syscall.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -71,5 +71,5 @@
 	SYS_IPC_REGISTER_IRQ,
 	SYS_IPC_UNREGISTER_IRQ,
-
+	
 	SYS_EVENT_SUBSCRIBE,
 	
@@ -89,13 +89,5 @@
 	SYS_DEBUG_ENABLE_CONSOLE,
 	SYS_DEBUG_DISABLE_CONSOLE,
-
-	SYS_PS_GET_CPU_INFO,
-	SYS_PS_GET_MEM_INFO,
-	SYS_PS_GET_TASKS,
-	SYS_PS_GET_TASK_INFO,
-	SYS_PS_GET_THREADS,
-	SYS_PS_GET_UPTIME,
-	SYS_PS_GET_LOAD,
-
+	
 	SYS_IPC_CONNECT_KBOX,
 	SYSCALL_END
Index: kernel/generic/include/sysinfo/abi.h
===================================================================
--- kernel/generic/include/sysinfo/abi.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
+++ kernel/generic/include/sysinfo/abi.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010 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 KERN_ABI_H_
+#define KERN_ABI_H_
+
+#define LOAD_STEPS        3
+#define TASK_NAME_BUFLEN  20
+
+typedef struct {
+	unsigned int id;
+	uint16_t frequency_mhz;
+	uint64_t idle_ticks;
+	uint64_t busy_ticks;
+} stats_cpu_t;
+
+typedef struct {
+	uint64_t total;
+	uint64_t unavail;
+	uint64_t used;
+	uint64_t free;
+} stats_physmem_t;
+
+typedef struct {
+	uint64_t call_sent;
+	uint64_t call_recieved;
+	uint64_t answer_sent;
+	uint64_t answer_recieved;
+	uint64_t irq_notif_recieved;
+	uint64_t forwarded;
+} stats_ipc_t;
+
+typedef struct {
+	char name[TASK_NAME_BUFLEN];
+	size_t virtmem;
+	size_t threads;
+	uint64_t ucycles;
+	uint64_t kcycles;
+	stats_ipc_t ipc_info;
+} stats_task_t;
+
+typedef uint32_t load_t;
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/sysinfo/stats.h
===================================================================
--- kernel/generic/include/sysinfo/stats.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
+++ kernel/generic/include/sysinfo/stats.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 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 KERN_STATS_H_
+#define KERN_STATS_H_
+
+extern void kload(void *arg);
+extern void stats_init(void);
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/sysinfo/sysinfo.h
===================================================================
--- kernel/generic/include/sysinfo/sysinfo.h	(revision c39a1038071eb342ce574c2266ba22c16f055453)
+++ kernel/generic/include/sysinfo/sysinfo.h	(revision fce3536ed6e901725440a6a9403d237da8f0e39a)
@@ -59,5 +59,4 @@
 typedef unative_t (*sysinfo_fn_val_t)(struct sysinfo_item *);
 typedef void *(*sysinfo_fn_data_t)(struct sysinfo_item *, size_t *);
-typedef struct sysinfo_item *(*sysinfo_fn_subtree_t)(const char *);
 
 typedef struct {
@@ -73,7 +72,17 @@
 } sysinfo_item_val_t;
 
+typedef struct {
+	sysinfo_item_val_type_t tag;
+	union {
+		unative_t val;
+		sysinfo_data_t data;
+	};
+} sysinfo_return_t;
+
+typedef sysinfo_return_t (*sysinfo_fn_subtree_t)(const char *);
+
 typedef union {
 	struct sysinfo_item *table;
-	sysinfo_fn_subtree_t find_item;
+	sysinfo_fn_subtree_t get_data;
 } sysinfo_subtree_t;
 
@@ -90,25 +99,18 @@
 } sysinfo_item_t;
 
-typedef struct {
-	sysinfo_item_val_type_t tag;
-	union {
-		unative_t val;
-		sysinfo_data_t data;
-	};
-} sysinfo_return_t;
-
-extern void sysinfo_init(void);
-
 extern void sysinfo_set_item_val(const char *, sysinfo_item_t **, unative_t);
 extern void sysinfo_set_item_data(const char *, sysinfo_item_t **, void *,
     size_t);
-extern void sysinfo_set_item_val_fn(const char *, sysinfo_item_t **,
+extern void sysinfo_set_item_fn_val(const char *, sysinfo_item_t **,
     sysinfo_fn_val_t);
-extern void sysinfo_set_item_data_fn(const char *, sysinfo_item_t **,
+extern void sysinfo_set_item_fn_data(const char *, sysinfo_item_t **,
     sysinfo_fn_data_t);
 extern void sysinfo_set_item_undefined(const char *, sysinfo_item_t **);
 
-extern sysinfo_return_t sysinfo_get_item(const char *, sysinfo_item_t **);
-extern void sysinfo_dump(sysinfo_item_t **, unsigned int);
+extern void sysinfo_set_subtree_fn(const char *, sysinfo_item_t **,
+    sysinfo_fn_subtree_t);
+
+extern void sysinfo_init(void);
+extern void sysinfo_dump(sysinfo_item_t *);
 
 unative_t sys_sysinfo_get_tag(void *, size_t);
