Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/Makefile	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -240,5 +240,5 @@
 	generic/src/mm/slab.c \
 	generic/src/lib/func.c \
-	generic/src/lib/memstr.c \
+	generic/src/lib/mem.c \
 	generic/src/lib/memfnc.c \
 	generic/src/lib/gsort.c \
Index: kernel/arch/abs32le/src/abs32le.c
===================================================================
--- kernel/arch/abs32le/src/abs32le.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/abs32le/src/abs32le.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -40,14 +40,12 @@
 #include <func.h>
 #include <config.h>
+#include <console/console.h>
 #include <errno.h>
 #include <context.h>
 #include <fpu_context.h>
 #include <interrupt.h>
+#include <ddi/irq.h>
 #include <syscall/copy.h>
-#include <ddi/irq.h>
-#include <proc/thread.h>
 #include <syscall/syscall.h>
-#include <console/console.h>
-#include <memstr.h>
 
 static void abs32le_post_mm_init(void);
Index: kernel/arch/abs32le/src/mm/page.c
===================================================================
--- kernel/arch/abs32le/src/mm/page.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/abs32le/src/mm/page.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -46,5 +46,4 @@
 #include <arch/asm.h>
 #include <debug.h>
-#include <memstr.h>
 #include <print.h>
 #include <interrupt.h>
Index: kernel/arch/amd64/src/amd64.c
===================================================================
--- kernel/arch/amd64/src/amd64.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/amd64/src/amd64.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -37,5 +37,5 @@
 #include <typedefs.h>
 #include <errno.h>
-#include <memstr.h>
+#include <mem.h>
 #include <interrupt.h>
 #include <console/console.h>
Index: kernel/arch/amd64/src/mm/page.c
===================================================================
--- kernel/arch/amd64/src/mm/page.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/amd64/src/mm/page.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -41,5 +41,4 @@
 #include <arch/asm.h>
 #include <config.h>
-#include <memstr.h>
 #include <interrupt.h>
 #include <print.h>
Index: kernel/arch/amd64/src/pm.c
===================================================================
--- kernel/arch/amd64/src/pm.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/amd64/src/pm.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -39,5 +39,5 @@
 #include <mm/as.h>
 #include <mm/frame.h>
-#include <memstr.h>
+#include <mem.h>
 #include <mm/slab.h>
 
Index: kernel/arch/arm32/src/ras.c
===================================================================
--- kernel/arch/arm32/src/ras.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/arm32/src/ras.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -44,5 +44,5 @@
 #include <arch/exception.h>
 #include <arch.h>
-#include <memstr.h>
+#include <mem.h>
 #include <typedefs.h>
 
Index: kernel/arch/ia32/src/ia32.c
===================================================================
--- kernel/arch/ia32/src/ia32.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia32/src/ia32.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -39,5 +39,5 @@
 #include <typedefs.h>
 #include <errno.h>
-#include <memstr.h>
+#include <mem.h>
 #include <interrupt.h>
 #include <console/console.h>
Index: kernel/arch/ia32/src/mm/page.c
===================================================================
--- kernel/arch/ia32/src/mm/page.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia32/src/mm/page.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -46,5 +46,4 @@
 #include <arch/asm.h>
 #include <debug.h>
-#include <memstr.h>
 #include <print.h>
 #include <interrupt.h>
Index: kernel/arch/ia32/src/pm.c
===================================================================
--- kernel/arch/ia32/src/pm.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia32/src/pm.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -44,5 +44,5 @@
 #include <mm/frame.h>
 #include <mm/slab.h>
-#include <memstr.h>
+#include <mem.h>
 #include <arch/boot/boot.h>
 #include <interrupt.h>
Index: kernel/arch/ia32/src/smp/smp.c
===================================================================
--- kernel/arch/ia32/src/smp/smp.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia32/src/smp/smp.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -53,5 +53,5 @@
 #include <mm/as.h>
 #include <log.h>
-#include <memstr.h>
+#include <mem.h>
 #include <arch/drivers/i8259.h>
 #include <cpu.h>
Index: kernel/arch/ia64/src/cpu/cpu.c
===================================================================
--- kernel/arch/ia64/src/cpu/cpu.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia64/src/cpu/cpu.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -37,5 +37,5 @@
 #include <arch/register.h>
 #include <print.h>
-#include <memstr.h>
+#include <mem.h>
 
 void cpu_arch_init(void)
Index: kernel/arch/ia64/src/mm/page.c
===================================================================
--- kernel/arch/ia64/src/mm/page.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia64/src/mm/page.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -47,5 +47,4 @@
 #include <arch/asm.h>
 #include <arch/barrier.h>
-#include <memstr.h>
 #include <align.h>
 
Index: kernel/arch/ia64/src/mm/vhpt.c
===================================================================
--- kernel/arch/ia64/src/mm/vhpt.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/ia64/src/mm/vhpt.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -33,5 +33,5 @@
 */
 
-#include <memstr.h>
+#include <mem.h>
 #include <arch/mm/vhpt.h>
 #include <mm/frame.h>
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/mips32/src/debugger.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -35,5 +35,4 @@
 #include <arch/debugger.h>
 #include <arch/barrier.h>
-#include <memstr.h>
 #include <console/kconsole.h>
 #include <console/cmd.h>
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/mips32/src/mips32.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -40,5 +40,5 @@
 #include <macros.h>
 #include <str.h>
-#include <memstr.h>
+#include <mem.h>
 #include <userspace.h>
 #include <syscall/syscall.h>
Index: kernel/arch/riscv64/src/mm/page.c
===================================================================
--- kernel/arch/riscv64/src/mm/page.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/riscv64/src/mm/page.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -46,5 +46,4 @@
 #include <arch/asm.h>
 #include <debug.h>
-#include <memstr.h>
 #include <print.h>
 #include <interrupt.h>
Index: kernel/arch/riscv64/src/riscv64.c
===================================================================
--- kernel/arch/riscv64/src/riscv64.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/riscv64/src/riscv64.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -48,5 +48,5 @@
 #include <proc/thread.h>
 #include <console/console.h>
-#include <memstr.h>
+#include <mem.h>
 
 char memcpy_from_uspace_failover_address;
Index: kernel/arch/sparc64/src/mm/sun4u/as.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/as.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/sparc64/src/mm/sun4u/as.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -47,5 +47,5 @@
 #include <bitops.h>
 #include <macros.h>
-#include <memstr.h>
+#include <mem.h>
 
 #endif /* CONFIG_TSB */
Index: kernel/arch/sparc64/src/mm/sun4v/as.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/as.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/sparc64/src/mm/sun4v/as.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -50,5 +50,5 @@
 #include <bitops.h>
 #include <macros.h>
-#include <memstr.h>
+#include <mem.h>
 
 #endif /* CONFIG_TSB */
Index: kernel/arch/sparc64/src/trap/trap.c
===================================================================
--- kernel/arch/sparc64/src/trap/trap.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/arch/sparc64/src/trap/trap.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -35,14 +35,4 @@
 
 #include <arch/trap/trap.h>
-#include <arch/trap/trap_table.h>
-#include <arch/trap/regwin.h>
-#include <arch/trap/exception.h>
-#include <arch/trap/interrupt.h>
-#include <arch/trap/mmu.h>
-#include <arch/asm.h>
-#include <memstr.h>
-#include <debug.h>
-#include <typedefs.h>
-#include <arch/drivers/tick.h>
 
 /** Initialize trap table. */
Index: kernel/genarch/src/acpi/madt.c
===================================================================
--- kernel/genarch/src/acpi/madt.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/acpi/madt.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -45,5 +45,4 @@
 #include <log.h>
 #include <mm/slab.h>
-#include <memstr.h>
 #include <gsort.h>
 
Index: kernel/genarch/src/drivers/ega/ega.c
===================================================================
--- kernel/genarch/src/drivers/ega/ega.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/drivers/ega/ega.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -42,5 +42,5 @@
 #include <typedefs.h>
 #include <arch/asm.h>
-#include <memstr.h>
+#include <mem.h>
 #include <str.h>
 #include <console/chardev.h>
Index: kernel/genarch/src/drivers/via-cuda/cuda.c
===================================================================
--- kernel/genarch/src/drivers/via-cuda/cuda.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/drivers/via-cuda/cuda.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -41,5 +41,5 @@
 #include <ddi/device.h>
 #include <synch/spinlock.h>
-#include <memstr.h>
+#include <mem.h>
 
 static irq_ownership_t cuda_claim(irq_t *irq);
Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/fb/fb.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -43,5 +43,5 @@
 #include <align.h>
 #include <panic.h>
-#include <memstr.h>
+#include <mem.h>
 #include <config.h>
 #include <bitops.h>
Index: kernel/genarch/src/mm/as_ht.c
===================================================================
--- kernel/genarch/src/mm/as_ht.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/mm/as_ht.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -43,5 +43,4 @@
 #include <mm/slab.h>
 #include <typedefs.h>
-#include <memstr.h>
 #include <adt/hash_table.h>
 #include <synch/mutex.h>
Index: kernel/genarch/src/mm/as_pt.c
===================================================================
--- kernel/genarch/src/mm/as_pt.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/mm/as_pt.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -44,5 +44,5 @@
 #include <arch/mm/as.h>
 #include <typedefs.h>
-#include <memstr.h>
+#include <mem.h>
 #include <arch.h>
 
Index: kernel/genarch/src/mm/page_ht.c
===================================================================
--- kernel/genarch/src/mm/page_ht.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/mm/page_ht.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -49,5 +49,4 @@
 #include <arch.h>
 #include <debug.h>
-#include <memstr.h>
 #include <adt/hash_table.h>
 #include <align.h>
Index: kernel/genarch/src/mm/page_pt.c
===================================================================
--- kernel/genarch/src/mm/page_pt.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/mm/page_pt.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -46,5 +46,5 @@
 #include <typedefs.h>
 #include <arch/asm.h>
-#include <memstr.h>
+#include <mem.h>
 #include <align.h>
 #include <macros.h>
Index: kernel/genarch/src/ofw/ofw_tree.c
===================================================================
--- kernel/genarch/src/ofw/ofw_tree.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/genarch/src/ofw/ofw_tree.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -39,5 +39,5 @@
 #include <mm/slab.h>
 #include <sysinfo/sysinfo.h>
-#include <memstr.h>
+#include <mem.h>
 #include <str.h>
 #include <panic.h>
Index: kernel/generic/include/mem.h
===================================================================
--- kernel/generic/include/mem.h	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/include/mem.h	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2001-2004 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 generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_MEM_H_
+#define KERN_MEM_H_
+
+#include <typedefs.h>
+#include <cc.h>
+
+#ifdef CONFIG_LTO
+#define DO_NOT_DISCARD ATTRIBUTE_USED
+#else
+#define DO_NOT_DISCARD
+#endif
+
+#define memset(dst, val, cnt)  __builtin_memset((dst), (val), (cnt))
+#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
+
+extern void memsetb(void *, size_t, uint8_t)
+    __attribute__((nonnull(1)));
+extern void memsetw(void *, size_t, uint16_t)
+    __attribute__((nonnull(1)));
+extern void *memmove(void *, const void *, size_t)
+    __attribute__((nonnull(1, 2))) DO_NOT_DISCARD;
+
+#endif
+
+/** @}
+ */
Index: rnel/generic/include/memstr.h
===================================================================
--- kernel/generic/include/memstr.h	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/*
- * Copyright (c) 2001-2004 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 generic
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_MEMSTR_H_
-#define KERN_MEMSTR_H_
-
-#include <typedefs.h>
-#include <cc.h>
-
-#ifdef CONFIG_LTO
-#define DO_NOT_DISCARD ATTRIBUTE_USED
-#else
-#define DO_NOT_DISCARD
-#endif
-
-#define memset(dst, val, cnt)  __builtin_memset((dst), (val), (cnt))
-#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
-
-extern void memsetb(void *, size_t, uint8_t)
-    __attribute__((nonnull(1)));
-extern void memsetw(void *, size_t, uint16_t)
-    __attribute__((nonnull(1)));
-extern void *memmove(void *, const void *, size_t)
-    __attribute__((nonnull(1, 2))) DO_NOT_DISCARD;
-
-#endif
-
-/** @}
- */
Index: kernel/generic/src/adt/cht.c
===================================================================
--- kernel/generic/src/adt/cht.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/adt/cht.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -291,5 +291,4 @@
 #include <adt/hash.h>
 #include <debug.h>
-#include <memstr.h>
 #include <mm/slab.h>
 #include <arch/barrier.h>
Index: kernel/generic/src/adt/hash_table.c
===================================================================
--- kernel/generic/src/adt/hash_table.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/adt/hash_table.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -43,5 +43,5 @@
 #include <debug.h>
 #include <mm/slab.h>
-#include <memstr.h>
+#include <mem.h>
 
 /** Create chained hash table.
Index: kernel/generic/src/cpu/cpu.c
===================================================================
--- kernel/generic/src/cpu/cpu.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/cpu/cpu.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -45,5 +45,5 @@
 #include <config.h>
 #include <panic.h>
-#include <memstr.h>
+#include <mem.h>
 #include <adt/list.h>
 #include <print.h>
Index: kernel/generic/src/ddi/irq.c
===================================================================
--- kernel/generic/src/ddi/irq.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/ddi/irq.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -75,5 +75,5 @@
 #include <console/console.h>
 #include <interrupt.h>
-#include <memstr.h>
+#include <mem.h>
 #include <arch.h>
 
Index: kernel/generic/src/ipc/event.c
===================================================================
--- kernel/generic/src/ipc/event.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/ipc/event.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -41,5 +41,4 @@
 #include <console/console.h>
 #include <proc/task.h>
-#include <memstr.h>
 #include <errno.h>
 #include <arch.h>
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/ipc/ipc.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -51,5 +51,5 @@
 #include <arch.h>
 #include <proc/task.h>
-#include <memstr.h>
+#include <mem.h>
 #include <debug.h>
 #include <print.h>
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/ipc/sysipc.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -35,5 +35,5 @@
 #include <arch.h>
 #include <errno.h>
-#include <memstr.h>
+#include <mem.h>
 #include <ipc/ipc.h>
 #include <abi/ipc/methods.h>
Index: kernel/generic/src/lib/elf.c
===================================================================
--- kernel/generic/src/lib/elf.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/lib/elf.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -44,5 +44,4 @@
 #include <mm/slab.h>
 #include <align.h>
-#include <memstr.h>
 #include <macros.h>
 #include <arch.h>
Index: kernel/generic/src/lib/gsort.c
===================================================================
--- kernel/generic/src/lib/gsort.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/lib/gsort.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -41,5 +41,5 @@
 
 #include <gsort.h>
-#include <memstr.h>
+#include <mem.h>
 #include <mm/slab.h>
 
Index: kernel/generic/src/lib/mem.c
===================================================================
--- kernel/generic/src/lib/mem.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/lib/mem.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2001-2004 Jakub Jermar
+ * Copyright (c) 2008 Jiri Svoboda
+ * 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
+ * @brief Memory string operations.
+ *
+ * This file provides architecture independent functions to manipulate blocks
+ * of memory. These functions are optimized as much as generic functions of
+ * this type can be.
+ */
+
+#include <mem.h>
+#include <typedefs.h>
+
+/** Fill block of memory.
+ *
+ * Fill cnt bytes at dst address with the value val.
+ *
+ * @param dst Destination address to fill.
+ * @param cnt Number of bytes to fill.
+ * @param val Value to fill.
+ *
+ */
+void memsetb(void *dst, size_t cnt, uint8_t val)
+{
+	memset(dst, val, cnt);
+}
+
+/** Fill block of memory.
+ *
+ * Fill cnt words at dst address with the value val. The filling
+ * is done word-by-word.
+ *
+ * @param dst Destination address to fill.
+ * @param cnt Number of words to fill.
+ * @param val Value to fill.
+ *
+ */
+void memsetw(void *dst, size_t cnt, uint16_t val)
+{
+	size_t i;
+	uint16_t *ptr = (uint16_t *) dst;
+	
+	for (i = 0; i < cnt; i++)
+		ptr[i] = val;
+}
+
+/** Move memory block with possible overlapping.
+ *
+ * Copy cnt bytes from src address to dst address. The source
+ * and destination memory areas may overlap.
+ *
+ * @param dst Destination address to copy to.
+ * @param src Source address to copy from.
+ * @param cnt Number of bytes to copy.
+ *
+ * @return Destination address.
+ *
+ */
+void *memmove(void *dst, const void *src, size_t cnt)
+{
+	/* Nothing to do? */
+	if (src == dst)
+		return dst;
+	
+	/* Non-overlapping? */
+	if ((dst >= src + cnt) || (src >= dst + cnt))
+		return memcpy(dst, src, cnt);
+	
+	uint8_t *dp;
+	const uint8_t *sp;
+	
+	/* Which direction? */
+	if (src > dst) {
+		/* Forwards. */
+		dp = dst;
+		sp = src;
+		
+		while (cnt-- != 0)
+			*dp++ = *sp++;
+	} else {
+		/* Backwards. */
+		dp = dst + (cnt - 1);
+		sp = src + (cnt - 1);
+		
+		while (cnt-- != 0)
+			*dp-- = *sp--;
+	}
+	
+	return dst;
+}
+
+/** @}
+ */
Index: rnel/generic/src/lib/memstr.c
===================================================================
--- kernel/generic/src/lib/memstr.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/*
- * Copyright (c) 2001-2004 Jakub Jermar
- * Copyright (c) 2008 Jiri Svoboda
- * 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
- * @brief Memory string operations.
- *
- * This file provides architecture independent functions to manipulate blocks
- * of memory. These functions are optimized as much as generic functions of
- * this type can be.
- */
-
-#include <memstr.h>
-#include <typedefs.h>
-
-/** Fill block of memory.
- *
- * Fill cnt bytes at dst address with the value val.
- *
- * @param dst Destination address to fill.
- * @param cnt Number of bytes to fill.
- * @param val Value to fill.
- *
- */
-void memsetb(void *dst, size_t cnt, uint8_t val)
-{
-	memset(dst, val, cnt);
-}
-
-/** Fill block of memory.
- *
- * Fill cnt words at dst address with the value val. The filling
- * is done word-by-word.
- *
- * @param dst Destination address to fill.
- * @param cnt Number of words to fill.
- * @param val Value to fill.
- *
- */
-void memsetw(void *dst, size_t cnt, uint16_t val)
-{
-	size_t i;
-	uint16_t *ptr = (uint16_t *) dst;
-	
-	for (i = 0; i < cnt; i++)
-		ptr[i] = val;
-}
-
-/** Move memory block with possible overlapping.
- *
- * Copy cnt bytes from src address to dst address. The source
- * and destination memory areas may overlap.
- *
- * @param dst Destination address to copy to.
- * @param src Source address to copy from.
- * @param cnt Number of bytes to copy.
- *
- * @return Destination address.
- *
- */
-void *memmove(void *dst, const void *src, size_t cnt)
-{
-	/* Nothing to do? */
-	if (src == dst)
-		return dst;
-	
-	/* Non-overlapping? */
-	if ((dst >= src + cnt) || (src >= dst + cnt))
-		return memcpy(dst, src, cnt);
-	
-	uint8_t *dp;
-	const uint8_t *sp;
-	
-	/* Which direction? */
-	if (src > dst) {
-		/* Forwards. */
-		dp = dst;
-		sp = src;
-		
-		while (cnt-- != 0)
-			*dp++ = *sp++;
-	} else {
-		/* Backwards. */
-		dp = dst + (cnt - 1);
-		sp = src + (cnt - 1);
-		
-		while (cnt-- != 0)
-			*dp-- = *sp--;
-	}
-	
-	return dst;
-}
-
-/** @}
- */
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/main/kinit.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -60,5 +60,5 @@
 #include <print.h>
 #include <log.h>
-#include <memstr.h>
+#include <mem.h>
 #include <console/console.h>
 #include <interrupt.h>
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/mm/as.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -69,5 +69,5 @@
 #include <debug.h>
 #include <print.h>
-#include <memstr.h>
+#include <mem.h>
 #include <macros.h>
 #include <bitops.h>
Index: kernel/generic/src/mm/backend_anon.c
===================================================================
--- kernel/generic/src/mm/backend_anon.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/mm/backend_anon.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -51,5 +51,5 @@
 #include <typedefs.h>
 #include <align.h>
-#include <memstr.h>
+#include <mem.h>
 #include <arch.h>
 
Index: kernel/generic/src/mm/backend_elf.c
===================================================================
--- kernel/generic/src/mm/backend_elf.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/mm/backend_elf.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -48,5 +48,5 @@
 #include <genarch/mm/page_ht.h>
 #include <align.h>
-#include <memstr.h>
+#include <mem.h>
 #include <macros.h>
 #include <arch.h>
Index: kernel/generic/src/mm/backend_phys.c
===================================================================
--- kernel/generic/src/mm/backend_phys.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/mm/backend_phys.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -43,5 +43,4 @@
 #include <mm/frame.h>
 #include <mm/slab.h>
-#include <memstr.h>
 #include <macros.h>
 #include <arch.h>
Index: kernel/generic/src/mm/page.c
===================================================================
--- kernel/generic/src/mm/page.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/mm/page.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -69,5 +69,4 @@
 #include <typedefs.h>
 #include <arch/asm.h>
-#include <memstr.h>
 #include <debug.h>
 #include <arch.h>
Index: kernel/generic/src/mm/slab.c
===================================================================
--- kernel/generic/src/mm/slab.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/mm/slab.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -104,5 +104,5 @@
 #include <mm/slab.h>
 #include <adt/list.h>
-#include <memstr.h>
+#include <mem.h>
 #include <align.h>
 #include <mm/frame.h>
Index: kernel/generic/src/printf/vsnprintf.c
===================================================================
--- kernel/generic/src/printf/vsnprintf.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/printf/vsnprintf.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -36,5 +36,5 @@
 #include <printf/printf_core.h>
 #include <str.h>
-#include <memstr.h>
+#include <mem.h>
 #include <errno.h>
 
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/proc/task.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -56,5 +56,4 @@
 #include <func.h>
 #include <str.h>
-#include <memstr.h>
 #include <syscall/copy.h>
 #include <macros.h>
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/proc/thread.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -61,5 +61,5 @@
 #include <arch/faddr.h>
 #include <atomic.h>
-#include <memstr.h>
+#include <mem.h>
 #include <print.h>
 #include <mm/slab.h>
Index: kernel/generic/src/udebug/udebug_ops.c
===================================================================
--- kernel/generic/src/udebug/udebug_ops.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/generic/src/udebug/udebug_ops.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -51,5 +51,5 @@
 #include <udebug/udebug.h>
 #include <udebug/udebug_ops.h>
-#include <memstr.h>
+#include <mem.h>
 
 /** Prepare a thread for a debugging operation.
Index: kernel/test/mm/falloc2.c
===================================================================
--- kernel/test/mm/falloc2.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/test/mm/falloc2.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -37,5 +37,5 @@
 #include <debug.h>
 #include <proc/thread.h>
-#include <memstr.h>
+#include <mem.h>
 #include <arch.h>
 
Index: kernel/test/mm/slab1.c
===================================================================
--- kernel/test/mm/slab1.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/test/mm/slab1.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -32,5 +32,5 @@
 #include <proc/thread.h>
 #include <arch.h>
-#include <memstr.h>
+#include <mem.h>
 
 #define VAL_COUNT  1024
Index: kernel/test/mm/slab2.c
===================================================================
--- kernel/test/mm/slab2.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/test/mm/slab2.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -33,5 +33,5 @@
 #include <arch.h>
 #include <mm/frame.h>
-#include <memstr.h>
+#include <mem.h>
 #include <synch/condvar.h>
 #include <synch/mutex.h>
Index: kernel/test/synch/workq-test-core.h
===================================================================
--- kernel/test/synch/workq-test-core.h	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/test/synch/workq-test-core.h	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -32,5 +32,5 @@
 #include <print.h>
 #include <proc/thread.h>
-#include <memstr.h>
+#include <mem.h>
 #include <synch/workqueue.h>
 
Index: kernel/test/synch/workqueue2.c
===================================================================
--- kernel/test/synch/workqueue2.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/test/synch/workqueue2.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -30,5 +30,4 @@
 #include <arch.h>
 #include <print.h>
-#include <memstr.h>
 #include <synch/workqueue.h>
 
Index: kernel/test/synch/workqueue3.c
===================================================================
--- kernel/test/synch/workqueue3.c	(revision e29e44bfc60bad156c2207d4a15f29c1a1645d85)
+++ kernel/test/synch/workqueue3.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
@@ -30,5 +30,4 @@
 #include <arch.h>
 #include <print.h>
-#include <memstr.h>
 #include <synch/workqueue.h>
 
