Merge pull request #318 from vax-r/Memory_barrier

scx_lavd: Enforce memory barrier in flip_sys_cpu_util
This commit is contained in:
Changwoo Min 2024-05-26 21:00:25 +09:00 committed by GitHub
commit 0371ccae40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -520,7 +520,7 @@ static struct sys_cpu_util *get_sys_cpu_util_next(void)
static void flip_sys_cpu_util(void)
{
__sys_cpu_util_idx ^= 0x1;
__sync_fetch_and_xor(&__sys_cpu_util_idx, 0x1);
}
static __attribute__((always_inline))