1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:07:34 +00:00

Kernel: Fix attribute ordering

Clang requires that attributes declared using the bracketed
`[[attr_name]]` syntax come before those with
`__attribute__((attr-name))`.

This fixes a Clang build error.
This commit is contained in:
Daniel Bertalan 2021-06-20 19:57:37 +02:00 committed by Ali Mohammad Pur
parent eee44c85d4
commit 221bd464a0

View file

@ -103,7 +103,7 @@ static Processor s_bsp_processor; // global but let's keep it "private"
// Once multi-tasking is ready, we spawn a new thread that starts in the // Once multi-tasking is ready, we spawn a new thread that starts in the
// init_stage2() function. Initialization continues there. // init_stage2() function. Initialization continues there.
extern "C" UNMAP_AFTER_INIT [[noreturn]] void init() extern "C" [[noreturn]] UNMAP_AFTER_INIT void init()
{ {
if ((FlatPtr)&end_of_kernel_image >= 0xc2000000u) { if ((FlatPtr)&end_of_kernel_image >= 0xc2000000u) {
// The kernel has grown too large again! // The kernel has grown too large again!
@ -193,7 +193,7 @@ extern "C" UNMAP_AFTER_INIT [[noreturn]] void init()
// //
// The purpose of init_ap() is to initialize APs for multi-tasking. // The purpose of init_ap() is to initialize APs for multi-tasking.
// //
extern "C" UNMAP_AFTER_INIT [[noreturn]] void init_ap(u32 cpu, Processor* processor_info) extern "C" [[noreturn]] UNMAP_AFTER_INIT void init_ap(u32 cpu, Processor* processor_info)
{ {
processor_info->early_initialize(cpu); processor_info->early_initialize(cpu);