aboutsummaryrefslogtreecommitdiff
path: root/arch/mn10300/include/asm/string.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-05-04 16:05:23 +0200
committerTakashi Iwai <tiwai@suse.de>2009-05-04 16:05:23 +0200
commit8560b9321f9050968f393ce1ec67e47c1a0bd5cf (patch)
tree658ebb20e4fd5dee840f27103b59da367ff473b1 /arch/mn10300/include/asm/string.h
parent72e31981a4e91f84c5b5e8994f5d25b1cf22b6cf (diff)
parent6574612fbb34c63117581e68f2231ddce027e41e (diff)
Merge branch 'fix/asoc' into topic/asoc
Diffstat (limited to 'arch/mn10300/include/asm/string.h')
-rw-r--r--arch/mn10300/include/asm/string.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/mn10300/include/asm/string.h b/arch/mn10300/include/asm/string.h
new file mode 100644
index 00000000000..47dbd4346c3
--- /dev/null
+++ b/arch/mn10300/include/asm/string.h
@@ -0,0 +1,32 @@
+/* MN10300 Optimised string functions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Modified by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_STRING_H
+#define _ASM_STRING_H
+
+#define __HAVE_ARCH_MEMSET
+#define __HAVE_ARCH_MEMCPY
+#define __HAVE_ARCH_MEMMOVE
+
+extern void *memset(void *dest, int ch, size_t count);
+extern void *memcpy(void *dest, const void *src, size_t count);
+extern void *memmove(void *dest, const void *src, size_t count);
+
+
+extern void __struct_cpy_bug(void);
+#define struct_cpy(x, y) \
+({ \
+ if (sizeof(*(x)) != sizeof(*(y))) \
+ __struct_cpy_bug; \
+ memcpy(x, y, sizeof(*(x))); \
+})
+
+#endif /* _ASM_STRING_H */