Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/asm/unaligned.h
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| static __inline uint32_t | static __inline uint32_t | ||||
| get_unaligned_le32(const void *p) | get_unaligned_le32(const void *p) | ||||
| { | { | ||||
| return (le32_to_cpup((const __le32 *)p)); | return (le32_to_cpup((const __le32 *)p)); | ||||
| } | } | ||||
| static __inline uint64_t | |||||
| get_unaligned_le64(const void *p) | |||||
| { | |||||
| return (le64_to_cpup((const __le64 *)p)); | |||||
| } | |||||
| static __inline void | static __inline void | ||||
| put_unaligned_le16(__le16 v, void *p) | put_unaligned_le16(__le16 v, void *p) | ||||
| { | { | ||||
| __le16 x; | __le16 x; | ||||
| x = cpu_to_le16(v); | x = cpu_to_le16(v); | ||||
| memcpy(p, &x, sizeof(x)); | memcpy(p, &x, sizeof(x)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||