sandybridge doesn't support clflushopt

This commit is contained in:
quackerd 2023-12-06 04:22:46 +08:00
parent 76a41666a0
commit 3320852dd5

View File

@ -68,7 +68,7 @@ static void * local_thread(void *)
printf("Local thread(%d): flushing %p.\n", local_core, addr); printf("Local thread(%d): flushing %p.\n", local_core, addr);
} }
_mm_clflushopt(addr); _mm_clflush(addr);
_mm_mfence(); _mm_mfence();
atomic_signal_fence(memory_order_seq_cst); atomic_signal_fence(memory_order_seq_cst);
@ -105,7 +105,7 @@ static void * remote_thread(void *)
temp = *addr; temp = *addr;
_mm_mfence(); _mm_mfence();
} else { } else {
_mm_clflushopt(addr); _mm_clflush(addr);
_mm_mfence(); _mm_mfence();
} }