Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/kern
Module Name: src
Committed By: riastradh
Date: Thu Feb 23 14:57:29 UTC 2023
Modified Files:
src/sys/kern: kern_lock.c kern_mutex.c
Log Message:
KERNEL_LOCK(9): Minor tweaks to ci->ci_biglock_wanted access.
1. Use atomic_load_relaxed to read ci->ci_biglock_wanted from another
CPU, for clarity and to avoid the appearance of data races in thread
sanitizers. (Reading ci->ci_biglock_wanted on the local CPU need
not be atomic because no other CPU can be writing to it.)
2. Use atomic_store_relaxed to update ci->ci_biglock_wanted when we
start to spin, to avoid the appearance of data races.
3. Add comments to explain what's going on and cross-reference the
specific matching membars in mutex_vector_enter.
related to PR kern/57240
To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/kern/kern_lock.c
cvs rdiff -u -r1.102 -r1.103 src/sys/kern/kern_mutex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index