From 03a093329fe10932bb847e2aa9b8a19618334bc8 Mon Sep 17 00:00:00 2001 From: stefan Date: Wed, 11 Aug 2010 10:33:25 +0000 Subject: [PATCH] - add an optimzed version of strcpy and strncpy git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@67 315a16e6-25f9-4109-90ae-ca3045a26c18 --- arch/x86/include/asm/string.h | 8 ++++++++ arch/x86/kernel/Makefile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h index 6ce57543..f31b6b60 100644 --- a/arch/x86/include/asm/string.h +++ b/arch/x86/include/asm/string.h @@ -80,6 +80,14 @@ inline static size_t strlen(const char *str) } #endif +#ifdef HAVE_ARCH_STRNCPY +char* strncpy(char *dest, const char *src, size_t n); +#endif + +#ifdef HAVE_ARCH_STRCPY +char* strcpy(char *dest, const char *src); +#endif + #ifdef __cplusplus } #endif diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 658b4476..e25883ee 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -1,5 +1,5 @@ C_source = rck.c syscall.c gdt.c kb.c timer.c irq.c isrs.c idt.c vga.c multiboot.c pci.c -ASM_source = entry.asm +ASM_source = entry.asm string.asm OBJS += $(patsubst %.c, %.o, $(filter %.c, $(C_source))) OBJS += $(patsubst %.asm, %.o, $(filter %.asm, $(ASM_source)))