diff --git a/inc/pbuf.h b/inc/pbuf.h index b6dfd5e..8974457 100644 --- a/inc/pbuf.h +++ b/inc/pbuf.h @@ -8,9 +8,6 @@ #include -#define __align4 __attribute__((aligned(4))) - - typedef void (*pbuf_callback_t)(void); //function pointer that will be called when a pbuf is freed in this pool struct pbuf_pool_s; @@ -48,13 +45,13 @@ #define PBUF_DECLARE_POOL(pool_name, pbuf_count, pbuf_size) \ -static uint8_t pool_name##_payload_memory[(pbuf_count) * (pbuf_size)] __align4; \ +static uint8_t pool_name##_payload_memory[(pbuf_count) * (pbuf_size)] __attribute__((aligned(4))); \ static pbuf_t pool_name##_memory[pbuf_count]; \ pbuf_pool_t pool_name #define STATIC_PBUF_DECLARE_POOL(pool_name, pbuf_count, pbuf_size) \ -static uint8_t pool_name##_payload_memory[(pbuf_count) * (pbuf_size)] __align4; \ +static uint8_t pool_name##_payload_memory[(pbuf_count) * (pbuf_size)] __attribute__((aligned(4))); \ static pbuf_t pool_name##_memory[pbuf_count]; \ static pbuf_pool_t pool_name