patch-2.1.110 linux/include/asm-alpha/string.h
Next file: linux/include/asm-alpha/t2.h
Previous file: linux/include/asm-alpha/serial.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Sun Jul 19 20:44:41 1998
- Orig file:
v2.1.109/linux/include/asm-alpha/string.h
- Orig date:
Tue Jun 9 11:57:31 1998
diff -u --recursive --new-file v2.1.109/linux/include/asm-alpha/string.h linux/include/asm-alpha/string.h
@@ -19,8 +19,8 @@
#endif
#define __HAVE_ARCH_MEMSET
-extern void * __constant_c_memset(void *, unsigned long, long);
-extern void * __memset(void *, char, size_t);
+extern void * __constant_c_memset(void *, unsigned long, size_t);
+extern void * __memset(void *, int, size_t);
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
#define memset(s, c, n) \
@@ -43,6 +43,18 @@
#define __HAVE_ARCH_STRCHR
#define __HAVE_ARCH_STRRCHR
#define __HAVE_ARCH_STRLEN
+
+/* The following routine is like memset except that it writes 16-bit
+ aligned values. The DEST and COUNT parameters must be even for
+ correct operation. */
+
+#define __HAVE_ARCH_MEMSETW
+extern void * __memsetw(void *dest, unsigned short, size_t count);
+
+#define memsetw(s, c, n) \
+(__builtin_constant_p(c) \
+ ? __constant_c_memset((s),0x0001000100010001UL*(unsigned short)(c),(n)) \
+ : __memsetw((s),(c),(n)))
#endif /* __KERNEL__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov