From 2fd62c52b47bf1ce07184f48da0e84bc934ef493 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 1 Oct 2025 02:40:30 +0200 Subject: [PATCH] Replace __sync compiler intrinsics with 'modern' __atomic --- kern/start.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kern/start.c b/kern/start.c index 7d0e855..a8175c2 100644 --- a/kern/start.c +++ b/kern/start.c @@ -30,8 +30,7 @@ volatile int max_hart = 0; /* This is where entry.S drops us of. All cores land here */ void start() { // Do this first - __sync_fetch_and_add(&max_hart, 1); - __sync_synchronize(); + __atomic_fetch_add(&max_hart, 1, __ATOMIC_SEQ_CST); u64 id = read_mhartid();