#ifndef _UAPI_LINUX_SWAB_H #define _UAPI_LINUX_SWAB_H #include <linux/types.h> #include <linux/compiler.h> #include <asm/swab.h> /* * casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. */ #define ___constant_swab16(x) ((__u16)( \ (((__u16)(x) & (__u16)0x00ffU) << 8) | \ (((__u16)(x) & (__u16)0xff00U) >> 8))) #define ___constant_swab32(x) ((__u32)( \ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ (((__u32)(x) & (__u32)0xff000000UL) >> 24))) #define ___constant_swab64(x) ((__u64)( \ (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) #define ___constant_swahw32(x) ((__u32)( \ (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) #define ___constant_swahb32(x) ((__u32)( \ (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) /* * Implement the following as inlines, but define the interface using * macros to allow constant folding when possible: * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32 */
static inline __attribute_const__ __u16 __fswab16(__u16 val) { #if defined (__arch_swab16) return __arch_swab16(val); #else return ___constant_swab16(val); #endif }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 28 | 84.85% | 1 | 33.33% |
david woodhouse | david woodhouse | 3 | 9.09% | 1 | 33.33% |
arnd bergmann | arnd bergmann | 2 | 6.06% | 1 | 33.33% |
Total | 33 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 28 | 84.85% | 1 | 33.33% |
david woodhouse | david woodhouse | 3 | 9.09% | 1 | 33.33% |
arnd bergmann | arnd bergmann | 2 | 6.06% | 1 | 33.33% |
Total | 33 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 83 | 94.32% | 1 | 33.33% |
david woodhouse | david woodhouse | 3 | 3.41% | 1 | 33.33% |
arnd bergmann | arnd bergmann | 2 | 2.27% | 1 | 33.33% |
Total | 88 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 30 | 100.00% | 1 | 100.00% |
Total | 30 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 30 | 100.00% | 1 | 100.00% |
Total | 30 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 31 | 96.88% | 1 | 50.00% |
denys vlasenko | denys vlasenko | 1 | 3.12% | 1 | 50.00% |
Total | 32 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 31 | 96.88% | 1 | 50.00% |
denys vlasenko | denys vlasenko | 1 | 3.12% | 1 | 50.00% |
Total | 32 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 31 | 96.88% | 1 | 50.00% |
denys vlasenko | denys vlasenko | 1 | 3.12% | 1 | 50.00% |
Total | 32 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 32 | 100.00% | 1 | 100.00% |
Total | 32 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 32 | 100.00% | 1 | 100.00% |
Total | 32 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 31 | 100.00% | 1 | 100.00% |
Total | 31 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 30 | 96.77% | 1 | 50.00% |
denys vlasenko | denys vlasenko | 1 | 3.23% | 1 | 50.00% |
Total | 31 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 30 | 96.77% | 1 | 50.00% |
denys vlasenko | denys vlasenko | 1 | 3.23% | 1 | 50.00% |
Total | 31 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 31 | 100.00% | 1 | 100.00% |
Total | 31 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 31 | 100.00% | 1 | 100.00% |
Total | 31 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
david howells | david howells | 619 | 90.90% | 1 | 25.00% |
arnd bergmann | arnd bergmann | 48 | 7.05% | 1 | 25.00% |
david woodhouse | david woodhouse | 9 | 1.32% | 1 | 25.00% |
denys vlasenko | denys vlasenko | 5 | 0.73% | 1 | 25.00% |
Total | 681 | 100.00% | 4 | 100.00% |