OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [string.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
#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
 
9
#define __HAVE_ARCH_STRRCHR
10
extern char * strrchr(const char * s, int c);
11
 
12
#define __HAVE_ARCH_STRCHR
13
extern char * strchr(const char * s, int c);
14
 
15
#define __HAVE_ARCH_MEMCPY
16
extern void * memcpy(void *, const void *, __kernel_size_t);
17
 
18
#define __HAVE_ARCH_MEMMOVE
19
extern void * memmove(void *, const void *, __kernel_size_t);
20
 
21
#define __HAVE_ARCH_MEMCHR
22
extern void * memchr(const void *, int, __kernel_size_t);
23
 
24
#define __HAVE_ARCH_MEMZERO
25
#define __HAVE_ARCH_MEMSET
26
extern void * memset(void *, int, __kernel_size_t);
27
 
28
extern void __memzero(void *ptr, __kernel_size_t n);
29
 
30
#define memset(p,v,n)                                                   \
31
        ({                                                              \
32
                if ((n) != 0) {                                          \
33
                        if (__builtin_constant_p((v)) && (v) == 0)       \
34
                                __memzero((p),(n));                     \
35
                        else                                            \
36
                                memset((p),(v),(n));                    \
37
                }                                                       \
38
                (p);                                                    \
39
        })
40
 
41
#define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); })
42
 
43
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.