diff options
author | Ken Steele <ken@tilera.com> | 2013-08-01 19:55:07 (GMT) |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-02 00:08:51 (GMT) |
commit | 5916700c768803546b6fe7d093dcba40d22fcf57 (patch) | |
tree | 07bbeb368b246e82ad23c6af151f4408f7be1cb0 /arch/tile/include/asm/string.h | |
parent | c53c70a90fdce3e7a53a0412abf7cc2b2a645988 (diff) | |
download | linux-5916700c768803546b6fe7d093dcba40d22fcf57.tar.xz |
tile: optimize strnlen using SIMD instructions
Using strlen as a model, add length checking to create strnlen.
Signed-off-by: Ken Steele <ken@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include/asm/string.h')
-rw-r--r-- | arch/tile/include/asm/string.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/tile/include/asm/string.h b/arch/tile/include/asm/string.h index 7535cf1..92b271b 100644 --- a/arch/tile/include/asm/string.h +++ b/arch/tile/include/asm/string.h @@ -21,8 +21,10 @@ #define __HAVE_ARCH_MEMMOVE #define __HAVE_ARCH_STRCHR #define __HAVE_ARCH_STRLEN +#define __HAVE_ARCH_STRNLEN extern __kernel_size_t strlen(const char *); +extern __kernel_size_t strnlen(const char *, __kernel_size_t); extern char *strchr(const char *s, int c); extern void *memchr(const void *s, int c, size_t n); extern void *memset(void *, int, __kernel_size_t); |