From 9ded7917da06dea7f7284648281fd5d827f8a9a4 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sun, 25 Jun 2017 20:44:44 +0200 Subject: Use the C11 alignas and noreturn macros --- kern/kmem_i.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kern/kmem_i.h') diff --git a/kern/kmem_i.h b/kern/kmem_i.h index d4671e2..beae6c4 100644 --- a/kern/kmem_i.h +++ b/kern/kmem_i.h @@ -18,6 +18,7 @@ #ifndef _KERN_KMEM_I_H #define _KERN_KMEM_I_H +#include #include #include @@ -30,13 +31,13 @@ * The flags member is a read-only CPU-local copy of the parent cache flags. */ struct kmem_cpu_pool { - struct mutex lock; + alignas(CPU_L1_SIZE) struct mutex lock; int flags; int size; int transfer_size; int nr_objs; void **array; -} __aligned(CPU_L1_SIZE); +}; /* * When a cache is created, its CPU pool type is determined from the buffer -- cgit v1.2.3