summaryrefslogtreecommitdiff
path: root/arch/x86/machine/cpu.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-25 20:44:44 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-25 20:50:25 +0200
commitaf89762df2afa2528b85bf32a63fc4bee804d758 (patch)
tree75ab1d8d1b4d89ceb6d17563367c40446c865521 /arch/x86/machine/cpu.c
parentf1e7e6aea387654555492cb65e3850c3e3fb139a (diff)
Use the C11 alignas and noreturn macros
Diffstat (limited to 'arch/x86/machine/cpu.c')
-rw-r--r--arch/x86/machine/cpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c
index 4746c5f..a53d8e2 100644
--- a/arch/x86/machine/cpu.c
+++ b/arch/x86/machine/cpu.c
@@ -16,6 +16,7 @@
*/
#include <assert.h>
+#include <stdalign.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
@@ -135,7 +136,7 @@ static const struct cpu_tls_seg cpu_tls_seg = {
/*
* Interrupt descriptor table.
*/
-static struct cpu_gate_desc cpu_idt[CPU_IDT_SIZE] __aligned(8) __read_mostly;
+static alignas(8) struct cpu_gate_desc cpu_idt[CPU_IDT_SIZE] __read_mostly;
/*
* Double fault handler, and stack for the main processor.
@@ -144,7 +145,7 @@ static struct cpu_gate_desc cpu_idt[CPU_IDT_SIZE] __aligned(8) __read_mostly;
* memory.
*/
static unsigned long cpu_double_fault_handler;
-static char cpu_double_fault_stack[TRAP_STACK_SIZE] __aligned(CPU_DATA_ALIGN);
+static alignas(CPU_DATA_ALIGN) char cpu_double_fault_stack[TRAP_STACK_SIZE];
void
cpu_delay(unsigned long usecs)