svn commit: r327196 - stable/11/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Tue Dec 26 10:09:19 UTC 2017
Author: kib
Date: Tue Dec 26 10:09:18 2017
New Revision: 327196
URL: https://svnweb.freebsd.org/changeset/base/327196
Log:
MFC r326973:
Use atomic_load(9) to read ppsinfo sequence numbers.
Modified:
stable/11/sys/kern/kern_tc.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/kern_tc.c
==============================================================================
--- stable/11/sys/kern/kern_tc.c Tue Dec 26 10:07:17 2017 (r327195)
+++ stable/11/sys/kern/kern_tc.c Tue Dec 26 10:09:18 2017 (r327196)
@@ -1603,10 +1603,10 @@ pps_fetch(struct pps_fetch_args *fapi, struct pps_stat
tv.tv_usec = fapi->timeout.tv_nsec / 1000;
timo = tvtohz(&tv);
}
- aseq = pps->ppsinfo.assert_sequence;
- cseq = pps->ppsinfo.clear_sequence;
- while (aseq == pps->ppsinfo.assert_sequence &&
- cseq == pps->ppsinfo.clear_sequence) {
+ aseq = atomic_load_int(&pps->ppsinfo.assert_sequence);
+ cseq = atomic_load_int(&pps->ppsinfo.clear_sequence);
+ while (aseq == atomic_load_int(&pps->ppsinfo.assert_sequence) &&
+ cseq == atomic_load_int(&pps->ppsinfo.clear_sequence)) {
if (abi_aware(pps, 1) && pps->driver_mtx != NULL) {
if (pps->flags & PPSFLAG_MTX_SPIN) {
err = msleep_spin(pps, pps->driver_mtx,
More information about the svn-src-stable
mailing list