Back to index

glibc  2.9
Defines | Functions
byteswap.h File Reference

Go to the source code of this file.

Defines

#define __bswap_constant_16(x)   ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
#define __bswap_constant_32(x)
#define __bswap_constant_64(x)

Functions

static __inline unsigned short int __bswap_16 (unsigned short int __bsx)
static __inline unsigned int __bswap_32 (unsigned int __bsx)
static __inline unsigned long int __bswap_64 (unsigned long int __bsx)

Define Documentation

#define __bswap_constant_16 (   x)    ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))

Definition at line 28 of file byteswap.h.

#define __bswap_constant_32 (   x)
Value:
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |                  \
      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))

Definition at line 54 of file byteswap.h.

#define __bswap_constant_64 (   x)
Value:
((((x) & 0xff00000000000000ul) >> 56)                                \
      | (((x) & 0x00ff000000000000ul) >>  40)                               \
      | (((x) & 0x0000ff0000000000ul) >> 24)                                \
      | (((x) & 0x000000ff00000000ul) >> 8)                                 \
      | (((x) & 0x00000000ff000000ul) << 8)                                 \
      | (((x) & 0x0000000000ff0000ul) << 24)                                \
      | (((x) & 0x000000000000ff00ul) << 40)                                \
      | (((x) & 0x00000000000000fful) << 56))

Definition at line 80 of file byteswap.h.


Function Documentation

static __inline unsigned short int __bswap_16 ( unsigned short int  __bsx) [static]

Definition at line 46 of file byteswap.h.

{
  return __bswap_constant_16 (__bsx);
}
static __inline unsigned int __bswap_32 ( unsigned int  __bsx) [static]

Definition at line 72 of file byteswap.h.

{
  return __bswap_constant_32 (__bsx);
}
static __inline unsigned long int __bswap_64 ( unsigned long int  __bsx) [static]

Definition at line 104 of file byteswap.h.

{
  return __bswap_constant_64 (__bsx);
}