diff options
author | Ken Steele <ken@tilera.com> | 2013-08-01 15:55:07 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-01 20:08:51 -0400 |
commit | 5916700c768803546b6fe7d093dcba40d22fcf57 (patch) | |
tree | 07bbeb368b246e82ad23c6af151f4408f7be1cb0 /arch/tile/include | |
parent | c53c70a90fdce3e7a53a0412abf7cc2b2a645988 (diff) |
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')
-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 7535cf1a30e..92b271bd9eb 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); |