Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __ASM_ARM_STRING_H
3#define __ASM_ARM_STRING_H
4
5/*
6 * We don't do inline string functions, since the
7 * optimised inline asm versions are not small.
8 */
9
10#define __HAVE_ARCH_STRRCHR
11extern char * strrchr(const char * s, int c);
12
13#define __HAVE_ARCH_STRCHR
14extern char * strchr(const char * s, int c);
15
16#define __HAVE_ARCH_MEMCPY
17extern void * memcpy(void *, const void *, __kernel_size_t);
18
19#define __HAVE_ARCH_MEMMOVE
20extern void * memmove(void *, const void *, __kernel_size_t);
21
22#define __HAVE_ARCH_MEMCHR
23extern void * memchr(const void *, int, __kernel_size_t);
24
25#define __HAVE_ARCH_MEMSET
26extern void * memset(void *, int, __kernel_size_t);
27
28#define __HAVE_ARCH_MEMSET32
29extern void *__memset32(uint32_t *, uint32_t v, __kernel_size_t);
30static inline void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n)
31{
32 return __memset32(p, v, n * 4);
33}
34
35#define __HAVE_ARCH_MEMSET64
36extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
37static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
38{
39 return __memset64(p, v, n * 8, v >> 32);
40}
41
42#endif
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __ASM_ARM_STRING_H
3#define __ASM_ARM_STRING_H
4
5/*
6 * We don't do inline string functions, since the
7 * optimised inline asm versions are not small.
8 */
9
10#define __HAVE_ARCH_STRRCHR
11extern char * strrchr(const char * s, int c);
12
13#define __HAVE_ARCH_STRCHR
14extern char * strchr(const char * s, int c);
15
16#define __HAVE_ARCH_MEMCPY
17extern void * memcpy(void *, const void *, __kernel_size_t);
18
19#define __HAVE_ARCH_MEMMOVE
20extern void * memmove(void *, const void *, __kernel_size_t);
21
22#define __HAVE_ARCH_MEMCHR
23extern void * memchr(const void *, int, __kernel_size_t);
24
25#define __HAVE_ARCH_MEMSET
26extern void * memset(void *, int, __kernel_size_t);
27
28#define __HAVE_ARCH_MEMSET32
29extern void *__memset32(uint32_t *, uint32_t v, __kernel_size_t);
30static inline void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n)
31{
32 return __memset32(p, v, n * 4);
33}
34
35#define __HAVE_ARCH_MEMSET64
36extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
37static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
38{
39 return __memset64(p, v, n * 8, v >> 32);
40}
41
42#endif