Lines 140-155
enum {
Link Here
|
140 |
#define bt_get_unaligned(ptr) \ |
140 |
#define bt_get_unaligned(ptr) \ |
141 |
({ \ |
141 |
({ \ |
142 |
struct __attribute__((packed)) { \ |
142 |
struct __attribute__((packed)) { \ |
143 |
typeof(*(ptr)) __v; \ |
143 |
__typeof__(*(ptr)) __v; \ |
144 |
} *__p = (typeof(__p)) (ptr); \ |
144 |
} *__p = (__typeof__(__p)) (ptr); \ |
145 |
__p->__v; \ |
145 |
__p->__v; \ |
146 |
}) |
146 |
}) |
147 |
|
147 |
|
148 |
#define bt_put_unaligned(val, ptr) \ |
148 |
#define bt_put_unaligned(val, ptr) \ |
149 |
do { \ |
149 |
do { \ |
150 |
struct __attribute__((packed)) { \ |
150 |
struct __attribute__((packed)) { \ |
151 |
typeof(*(ptr)) __v; \ |
151 |
__typeof__(*(ptr)) __v; \ |
152 |
} *__p = (typeof(__p)) (ptr); \ |
152 |
} *__p = (__typeof__(__p)) (ptr); \ |
153 |
__p->__v = (val); \ |
153 |
__p->__v = (val); \ |
154 |
} while(0) |
154 |
} while(0) |
155 |
|
155 |
|