`cpu_to_be32()`/`be32_to_cpu()`/`cpu_to_le32()`/`le32_to_cpu()` `include/asm/byteorder.h`
Prev | Chapter 6. Common Routines | Next

## `cpu_to_be32()`/`be32_to_cpu()`/`cpu_to_le32()`/`le32_to_cpu()` `include/asm/byteorder.h`

The `cpu_to_be32()` family (where the "32" can be replaced by 64 or 16, and the "be" can be replaced by "le") are the general way to do endian conversions in the kernel: they return the converted value. All variations supply the reverse as well: `be32_to_cpu()`, etc.

There are two major variations of these functions: the pointer variation, such as `cpu_to_be32p()`, which take a pointer to the given type, and return the converted value. The other variation is the "in-situ" family, such as `cpu_to_be32s()`, which convert value referred to by the pointer, and return void.

Prev | Up | Next
`mdelay()`/`udelay()` `include/asm/delay.h` `include/linux/delay.h` | Home | `local_irq_save()`/`local_irq_restore()` `include/asm/system.h`