Replace __sync compiler intrinsics with 'modern' __atomic

This commit is contained in:
Imbus 2025-10-01 02:40:30 +02:00
parent 9d6c9a8bc5
commit 2fd62c52b4

View file

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