diff options
author | Richard Braun <rbraun@sceen.net> | 2017-06-25 20:44:44 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-06-25 20:50:25 +0200 |
commit | 9ded7917da06dea7f7284648281fd5d827f8a9a4 (patch) | |
tree | 75ab1d8d1b4d89ceb6d17563367c40446c865521 /kern/kmem_i.h | |
parent | 5ee8402d3746e1e7831f6094aa07d29c5306b416 (diff) |
Use the C11 alignas and noreturn macros
Diffstat (limited to 'kern/kmem_i.h')
-rw-r--r-- | kern/kmem_i.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 <stdalign.h> #include <stddef.h> #include <kern/list.h> @@ -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 |