Replace __sync compiler intrinsics with 'modern' __atomic
This commit is contained in:
parent
9d6c9a8bc5
commit
2fd62c52b4
1 changed files with 1 additions and 2 deletions
|
|
@ -30,8 +30,7 @@ volatile int max_hart = 0;
|
||||||
/* This is where entry.S drops us of. All cores land here */
|
/* This is where entry.S drops us of. All cores land here */
|
||||||
void start() {
|
void start() {
|
||||||
// Do this first
|
// Do this first
|
||||||
__sync_fetch_and_add(&max_hart, 1);
|
__atomic_fetch_add(&max_hart, 1, __ATOMIC_SEQ_CST);
|
||||||
__sync_synchronize();
|
|
||||||
|
|
||||||
u64 id = read_mhartid();
|
u64 id = read_mhartid();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue