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/xcall.c | |
parent | 5ee8402d3746e1e7831f6094aa07d29c5306b416 (diff) |
Use the C11 alignas and noreturn macros
Diffstat (limited to 'kern/xcall.c')
-rw-r--r-- | kern/xcall.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kern/xcall.c b/kern/xcall.c index 1c052ac4..aab45b3b 100644 --- a/kern/xcall.c +++ b/kern/xcall.c @@ -16,6 +16,7 @@ */ #include <assert.h> +#include <stdalign.h> #include <stddef.h> #include <kern/atomic.h> @@ -27,9 +28,9 @@ #include <machine/cpu.h> struct xcall { - xcall_fn_t fn; + alignas(CPU_L1_SIZE) xcall_fn_t fn; void *arg; -} __aligned(CPU_L1_SIZE); +}; /* * Per-CPU data. @@ -48,11 +49,11 @@ struct xcall { * between multiple cross-calls. */ struct xcall_cpu_data { - struct xcall send_calls[X15_MAX_CPUS]; + alignas(CPU_L1_SIZE) struct xcall send_calls[X15_MAX_CPUS]; struct xcall *recv_call; struct spinlock lock; -} __aligned(CPU_L1_SIZE); +}; static struct xcall_cpu_data xcall_cpu_data __percpu; |