pintos/src/lib/endian.h File Reference

Go to the source code of this file.

Defines

#define endian_swap32(x)
#define endian_swap16(x)   ((((x) & 0xff00)>> 8) | (((x) & 0x00ff) << 8))
#define endian_swap24(x)   (((x) >> 16) & 0xff) | (((x) & 0xff) << 16) | ((x) & 0xff00)
#define be32_to_machine(x)   endian_swap32(x)
#define be16_to_machine(x)   endian_swap16(x)
#define be24_to_machine(x)   endian_swap24(x)
#define machine_to_be32(x)   endian_swap32(x)
#define machine_to_be16(x)   endian_swap16(x)
#define machine_to_be24(x)   endian_swap24(x)


Define Documentation

#define be16_to_machine ( x   )     endian_swap16(x)

Definition at line 14 of file endian.h.

#define be24_to_machine ( x   )     endian_swap24(x)

Definition at line 15 of file endian.h.

#define be32_to_machine ( x   )     endian_swap32(x)

Definition at line 13 of file endian.h.

Referenced by msc_get_geometry().

#define endian_swap16 ( x   )     ((((x) & 0xff00)>> 8) | (((x) & 0x00ff) << 8))

Definition at line 10 of file endian.h.

#define endian_swap24 ( x   )     (((x) >> 16) & 0xff) | (((x) & 0xff) << 16) | ((x) & 0xff00)

Definition at line 11 of file endian.h.

#define endian_swap32 ( x   ) 

Value:

((((x) & 0xff000000) >> 24) | \
                                   (((x) & 0x00ff0000) >> 8)  | \
                                   (((x) & 0x0000ff00) << 8)  | \
                                   (((x) & 0x000000ff) << 24))

Definition at line 6 of file endian.h.

#define machine_to_be16 ( x   )     endian_swap16(x)

Definition at line 17 of file endian.h.

Referenced by msc_io().

#define machine_to_be24 ( x   )     endian_swap24(x)

Definition at line 18 of file endian.h.

Referenced by msc_io().

#define machine_to_be32 ( x   )     endian_swap32(x)

Definition at line 16 of file endian.h.


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6