~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/alpha/include/asm/string.h

Version: ~ [ linux-5.8 ] ~ [ linux-5.7.12 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.55 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.136 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.191 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.232 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.232 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __ALPHA_STRING_H__
  2 #define __ALPHA_STRING_H__
  3 
  4 #ifdef __KERNEL__
  5 
  6 /*
  7  * GCC of any recent vintage doesn't do stupid things with bcopy.
  8  * EGCS 1.1 knows all about expanding memcpy inline, others don't.
  9  *
 10  * Similarly for a memset with data = 0.
 11  */
 12 
 13 #define __HAVE_ARCH_MEMCPY
 14 extern void * memcpy(void *, const void *, size_t);
 15 #define __HAVE_ARCH_MEMMOVE
 16 extern void * memmove(void *, const void *, size_t);
 17 
 18 /* For backward compatibility with modules.  Unused otherwise.  */
 19 extern void * __memcpy(void *, const void *, size_t);
 20 
 21 #define memcpy __builtin_memcpy
 22 
 23 #define __HAVE_ARCH_MEMSET
 24 extern void * __constant_c_memset(void *, unsigned long, size_t);
 25 extern void * ___memset(void *, int, size_t);
 26 extern void * __memset(void *, int, size_t);
 27 extern void * memset(void *, int, size_t);
 28 
 29 /* For gcc 3.x, we cannot have the inline function named "memset" because
 30    the __builtin_memset will attempt to resolve to the inline as well,
 31    leading to a "sorry" about unimplemented recursive inlining.  */
 32 extern inline void *__memset(void *s, int c, size_t n)
 33 {
 34         if (__builtin_constant_p(c)) {
 35                 if (__builtin_constant_p(n)) {
 36                         return __builtin_memset(s, c, n);
 37                 } else {
 38                         unsigned long c8 = (c & 0xff) * 0x0101010101010101UL;
 39                         return __constant_c_memset(s, c8, n);
 40                 }
 41         }
 42         return ___memset(s, c, n);
 43 }
 44 
 45 #define memset __memset
 46 
 47 #define __HAVE_ARCH_STRCPY
 48 extern char * strcpy(char *,const char *);
 49 #define __HAVE_ARCH_STRNCPY
 50 extern char * strncpy(char *, const char *, size_t);
 51 #define __HAVE_ARCH_STRCAT
 52 extern char * strcat(char *, const char *);
 53 #define __HAVE_ARCH_STRNCAT
 54 extern char * strncat(char *, const char *, size_t);
 55 #define __HAVE_ARCH_STRCHR
 56 extern char * strchr(const char *,int);
 57 #define __HAVE_ARCH_STRRCHR
 58 extern char * strrchr(const char *,int);
 59 #define __HAVE_ARCH_STRLEN
 60 extern size_t strlen(const char *);
 61 #define __HAVE_ARCH_MEMCHR
 62 extern void * memchr(const void *, int, size_t);
 63 
 64 /* The following routine is like memset except that it writes 16-bit
 65    aligned values.  The DEST and COUNT parameters must be even for 
 66    correct operation.  */
 67 
 68 #define __HAVE_ARCH_MEMSETW
 69 extern void * __memsetw(void *dest, unsigned short, size_t count);
 70 
 71 #define memsetw(s, c, n)                                                 \
 72 (__builtin_constant_p(c)                                                 \
 73  ? __constant_c_memset((s),0x0001000100010001UL*(unsigned short)(c),(n)) \
 74  : __memsetw((s),(c),(n)))
 75 
 76 #endif /* __KERNEL__ */
 77 
 78 #endif /* __ALPHA_STRING_H__ */
 79 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp