Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / include / vdso / unaligned.h
blobeee3d2a4dbe4d3dff1e59433dccbb6d39c2d71ff
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __VDSO_UNALIGNED_H
3 #define __VDSO_UNALIGNED_H
5 #define __get_unaligned_t(type, ptr) ({ \
6 const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
7 __pptr->x; \
8 })
10 #define __put_unaligned_t(type, val, ptr) do { \
11 struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
12 __pptr->x = (val); \
13 } while (0)
15 #endif /* __VDSO_UNALIGNED_H */