diff options
author | Ken Steele <ken@tilera.com> | 2013-08-01 21:55:07 +0200 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-02 02:08:51 +0200 |
commit | 5916700c768803546b6fe7d093dcba40d22fcf57 (patch) | |
tree | 07bbeb368b246e82ad23c6af151f4408f7be1cb0 /arch/tile/include | |
parent | tile: optimize and clean up string functions (diff) | |
download | linux-5916700c768803546b6fe7d093dcba40d22fcf57.tar.xz linux-5916700c768803546b6fe7d093dcba40d22fcf57.zip |
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 7535cf1a30e4..92b271bd9ebd 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); |