wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 1 | #ifndef __ASM_ARM_STRING_H |
| 2 | #define __ASM_ARM_STRING_H |
| 3 | |
| 4 | /* |
| 5 | * We don't do inline string functions, since the |
| 6 | * optimised inline asm versions are not small. |
| 7 | */ |
| 8 | |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 9 | #undef __HAVE_ARCH_STRRCHR |
wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 10 | extern char * strrchr(const char * s, int c); |
| 11 | |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 12 | #undef __HAVE_ARCH_STRCHR |
wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 13 | extern char * strchr(const char * s, int c); |
| 14 | |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 15 | #undef __HAVE_ARCH_MEMCPY |
wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 16 | extern void * memcpy(void *, const void *, __kernel_size_t); |
| 17 | |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 18 | #undef __HAVE_ARCH_MEMMOVE |
wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 19 | extern void * memmove(void *, const void *, __kernel_size_t); |
| 20 | |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 21 | #undef __HAVE_ARCH_MEMCHR |
wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 22 | extern void * memchr(const void *, int, __kernel_size_t); |
| 23 | |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 24 | #undef __HAVE_ARCH_MEMZERO |
| 25 | #undef __HAVE_ARCH_MEMSET |
wdenk | 81da363 | 2002-08-15 09:39:42 +0000 | [diff] [blame] | 26 | extern void * memset(void *, int, __kernel_size_t); |
| 27 | |
| 28 | #if 0 |
| 29 | extern void __memzero(void *ptr, __kernel_size_t n); |
| 30 | |
| 31 | #define memset(p,v,n) \ |
| 32 | ({ \ |
| 33 | if ((n) != 0) { \ |
| 34 | if (__builtin_constant_p((v)) && (v) == 0) \ |
| 35 | __memzero((p),(n)); \ |
| 36 | else \ |
| 37 | memset((p),(v),(n)); \ |
| 38 | } \ |
| 39 | (p); \ |
| 40 | }) |
| 41 | |
| 42 | #define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); }) |
| 43 | #else |
| 44 | extern void memzero(void *ptr, __kernel_size_t n); |
| 45 | #endif |
| 46 | |
| 47 | #endif |