--- libelwix/inc/elwix/aring.h 2025/09/26 10:16:59 1.2 +++ libelwix/inc/elwix/aring.h 2025/09/26 16:01:58 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aring.h,v 1.2 2025/09/26 10:16:59 misho Exp $ +* $Id: aring.h,v 1.3 2025/09/26 16:01:58 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -46,12 +46,13 @@ SUCH DAMAGE. #ifndef __ARING_H #define __ARING_H +#define E_ATOMIC_ALIGN alignas(sizeof(int) * 8) typedef struct { - atomic_int rb_head; - atomic_int rb_tail; - int rb_bufnum; - struct iovec *rb_buffer; + E_ATOMIC_ALIGN int rb_head; + E_ATOMIC_ALIGN int rb_tail; + int rb_bufnum; + struct iovec *rb_buffer; } ringbuf_t;