ReactOS 0.4.16-dev-91-g764881a
swab.h File Reference
#include "compiler.h"
Include dependency graph for swab.h:

Go to the source code of this file.

Macros

#define ___swab16(x)
 
#define ___swab32(x)
 
#define ___swab64(x)
 
#define ___constant_swab16(x)
 
#define ___constant_swab32(x)
 
#define ___constant_swab64(x)
 
#define __arch__swab16(x)   ({ __u16 __tmp = (x) ; ___swab16(__tmp); })
 
#define __arch__swab32(x)   ({ __u32 __tmp = (x) ; ___swab32(__tmp); })
 
#define __arch__swab64(x)   ({ __u64 __tmp = (x) ; ___swab64(__tmp); })
 
#define __arch__swab16p(x)   __arch__swab16(*(x))
 
#define __arch__swab32p(x)   __arch__swab32(*(x))
 
#define __arch__swab64p(x)   __arch__swab64(*(x))
 
#define __arch__swab16s(x)   do { *(x) = __arch__swab16p((x)); } while (0)
 
#define __arch__swab32s(x)   do { *(x) = __arch__swab32p((x)); } while (0)
 
#define __arch__swab64s(x)   do { *(x) = __arch__swab64p((x)); } while (0)
 
#define __swab16(x)   __fswab16(x)
 
#define __swab32(x)   __fswab32(x)
 
#define __swab64(x)   __fswab64(x)
 

Functions

static __inline__ __attribute_const__ __u16 __fswab16 (__u16 x)
 
static __inline__ __u16 __swab16p (const __u16 *x)
 
static __inline__ void __swab16s (__u16 *addr)
 
static __inline__ __attribute_const__ __u32 __fswab32 (__u32 x)
 
static __inline__ __u32 __swab32p (const __u32 *x)
 
static __inline__ void __swab32s (__u32 *addr)
 

Macro Definition Documentation

◆ ___constant_swab16

#define ___constant_swab16 (   x)
Value:
((__u16)( \
(((__u16)(x) & (__u16)0x00ffU) << 8) | \
(((__u16)(x) & (__u16)0xff00U) >> 8) ))
u16 __u16
Definition: btrfs.h:18
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define __u16
Definition: types.h:13

Definition at line 55 of file swab.h.

◆ ___constant_swab32

#define ___constant_swab32 (   x)
Value:
((__u32)( \
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
(((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
u32 __u32
Definition: btrfs.h:19
#define __u32
Definition: types.h:15

Definition at line 59 of file swab.h.

◆ ___constant_swab64

#define ___constant_swab64 (   x)
Value:
((__u64)( \
(__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
(__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
(__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
(__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
(__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
(__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
(__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
(__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
u64 __u64
Definition: btrfs.h:20
#define __u64
Definition: types.h:17

Definition at line 65 of file swab.h.

◆ ___swab16

#define ___swab16 (   x)
Value:
({ \
__u16 __x = (x); \
((__u16)( \
(((__u16)(__x) & (__u16)0x00ffU) << 8) | \
(((__u16)(__x) & (__u16)0xff00U) >> 8) )); \
})

Definition at line 23 of file swab.h.

◆ ___swab32

#define ___swab32 (   x)
Value:
({ \
__u32 __x = (x); \
((__u32)( \
(((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \
(((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | \
(((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | \
(((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \
})

Definition at line 31 of file swab.h.

◆ ___swab64

#define ___swab64 (   x)
Value:
({ \
__u64 __x = (x); \
((__u64)( \
(__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \
(__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \
(__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \
(__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | \
(__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | \
(__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
(__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \
(__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \
})

Definition at line 41 of file swab.h.

◆ __arch__swab16

#define __arch__swab16 (   x)    ({ __u16 __tmp = (x) ; ___swab16(__tmp); })

Definition at line 80 of file swab.h.

◆ __arch__swab16p

#define __arch__swab16p (   x)    __arch__swab16(*(x))

Definition at line 90 of file swab.h.

◆ __arch__swab16s

#define __arch__swab16s (   x)    do { *(x) = __arch__swab16p((x)); } while (0)

Definition at line 100 of file swab.h.

◆ __arch__swab32

#define __arch__swab32 (   x)    ({ __u32 __tmp = (x) ; ___swab32(__tmp); })

Definition at line 83 of file swab.h.

◆ __arch__swab32p

#define __arch__swab32p (   x)    __arch__swab32(*(x))

Definition at line 93 of file swab.h.

◆ __arch__swab32s

#define __arch__swab32s (   x)    do { *(x) = __arch__swab32p((x)); } while (0)

Definition at line 103 of file swab.h.

◆ __arch__swab64

#define __arch__swab64 (   x)    ({ __u64 __tmp = (x) ; ___swab64(__tmp); })

Definition at line 86 of file swab.h.

◆ __arch__swab64p

#define __arch__swab64p (   x)    __arch__swab64(*(x))

Definition at line 96 of file swab.h.

◆ __arch__swab64s

#define __arch__swab64s (   x)    do { *(x) = __arch__swab64p((x)); } while (0)

Definition at line 106 of file swab.h.

◆ __swab16

#define __swab16 (   x)    __fswab16(x)

Definition at line 127 of file swab.h.

◆ __swab32

#define __swab32 (   x)    __fswab32(x)

Definition at line 128 of file swab.h.

◆ __swab64

#define __swab64 (   x)    __fswab64(x)

Definition at line 129 of file swab.h.

Function Documentation

◆ __fswab16()

static __inline__ __attribute_const__ __u16 __fswab16 ( __u16  x)
static

Definition at line 133 of file swab.h.

134{
135 return __arch__swab16(x);
136}
#define __arch__swab16(x)
Definition: swab.h:80

◆ __fswab32()

static __inline__ __attribute_const__ __u32 __fswab32 ( __u32  x)
static

Definition at line 146 of file swab.h.

147{
148 return __arch__swab32(x);
149}
#define __arch__swab32(x)
Definition: swab.h:83

◆ __swab16p()

static __inline__ __u16 __swab16p ( const __u16 x)
static

Definition at line 137 of file swab.h.

138{
139 return __arch__swab16p(x);
140}
#define __arch__swab16p(x)
Definition: swab.h:90

◆ __swab16s()

static __inline__ void __swab16s ( __u16 addr)
static

Definition at line 141 of file swab.h.

142{
144}
GLenum const GLvoid * addr
Definition: glext.h:9621
#define __arch__swab16s(x)
Definition: swab.h:100

◆ __swab32p()

static __inline__ __u32 __swab32p ( const __u32 x)
static

Definition at line 150 of file swab.h.

151{
152 return __arch__swab32p(x);
153}
#define __arch__swab32p(x)
Definition: swab.h:93

◆ __swab32s()

static __inline__ void __swab32s ( __u32 addr)
static

Definition at line 154 of file swab.h.

155{
157}
#define __arch__swab32s(x)
Definition: swab.h:103