27 #include <sys/cdefs.h>
30 #include <sys/libkern.h>
31 #include <sys/limits.h>
60 static const unsigned long mask01 = 0x01010101;
61 static const unsigned long mask80 = 0x80808080;
63 static const unsigned long mask01 = 0x0101010101010101;
64 static const unsigned long mask80 = 0x8080808080808080;
66 #error Unsupported word size
69 #define LONGPTR_MASK (sizeof(long) - 1)
78 return (p - str + x); \
85 const unsigned long *lp;
98 lp = (
const unsigned long *)((uintptr_t)str & ~
LONGPTR_MASK);
100 vb = ((~*lp) & mask80);
104 for (p = str; p < (
const char *)lp; p++)
111 vb = ((~*lp) & mask80);
113 p = (
const char *)(lp);
size_t strlen(const char *str)