Align blk.data to 16 bytes

This commit is contained in:
angt
2015-11-27 08:07:53 +01:00
parent e20be0ad97
commit 6ed736327a
2 changed files with 5 additions and 1 deletions

View File

@@ -14,9 +14,13 @@
#define PALIGN(x) ((void *)ALIGN((size_t)(x))) #define PALIGN(x) ((void *)ALIGN((size_t)(x)))
#define PALIGN_DOWN(x) ((void *)ALIGN_DOWN((size_t)(x))) #define PALIGN_DOWN(x) ((void *)ALIGN_DOWN((size_t)(x)))
#define _1_(x) (__builtin_expect((x), 1))
#define _0_(x) (__builtin_expect((x), 0))
#define _printf_(A,B) __attribute__((format(printf,A,B))) #define _printf_(A,B) __attribute__((format(printf,A,B)))
#define _noreturn_ __attribute__((noreturn)) #define _noreturn_ __attribute__((noreturn))
#define _unused_ __attribute__((unused)) #define _unused_ __attribute__((unused))
#define _align_(...) __attribute__((aligned(__VA_ARGS__)))
typedef struct buffer buffer_t; typedef struct buffer buffer_t;

View File

@@ -36,7 +36,7 @@ struct fdbuf {
struct blk { struct blk {
size_t size; size_t size;
uint8_t data[GT_MTU_MAX]; uint8_t data[GT_MTU_MAX] _align_(16);
}; };
struct crypto_ctx { struct crypto_ctx {