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();