From af89762df2afa2528b85bf32a63fc4bee804d758 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 --- arch/x86/machine/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/x86/machine/cpu.c') 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 +#include #include #include #include @@ -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) -- cgit v1.2.3