1
2#ifndef __ASM_ARM_STRING_H
3#define __ASM_ARM_STRING_H
4
5
6
7
8
9
10
11
12
13#define __HAVE_ARCH_STRRCHR
14extern char * strrchr(const char * s, int c);
15
16#define __HAVE_ARCH_STRCHR
17extern char * strchr(const char * s, int c);
18
19#define __HAVE_ARCH_MEMCPY
20extern void * memcpy(void *, const void *, __kernel_size_t);
21extern void *__memcpy(void *dest, const void *src, __kernel_size_t n);
22
23#define __HAVE_ARCH_MEMMOVE
24extern void * memmove(void *, const void *, __kernel_size_t);
25extern void *__memmove(void *dest, const void *src, __kernel_size_t n);
26
27#define __HAVE_ARCH_MEMCHR
28extern void * memchr(const void *, int, __kernel_size_t);
29
30#define __HAVE_ARCH_MEMSET
31extern void * memset(void *, int, __kernel_size_t);
32extern void *__memset(void *s, int c, __kernel_size_t n);
33
34#define __HAVE_ARCH_MEMSET32
35extern void *__memset32(uint32_t *, uint32_t v, __kernel_size_t);
36static inline void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n)
37{
38 return __memset32(p, v, n * 4);
39}
40
41#define __HAVE_ARCH_MEMSET64
42extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
43static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
44{
45 return __memset64(p, v, n * 8, v >> 32);
46}
47
48
49
50
51
52
53
54
55
56
57#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
58#define memcpy(dst, src, len) __memcpy(dst, src, len)
59#define memmove(dst, src, len) __memmove(dst, src, len)
60#define memset(s, c, n) __memset(s, c, n)
61
62#ifndef __NO_FORTIFY
63#define __NO_FORTIFY
64#endif
65
66#endif
67
68#endif
69