svn commit: r304841 - stable/11/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Fri Aug 26 09:40:36 UTC 2016
Author: kib
Date: Fri Aug 26 09:40:34 2016
New Revision: 304841
URL: https://svnweb.freebsd.org/changeset/base/304841
Log:
MFC r303385:
Reduce the resettodr_lock scope to only CLOCK_SETTIME() call.
Modified:
stable/11/sys/kern/subr_rtc.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/subr_rtc.c
==============================================================================
--- stable/11/sys/kern/subr_rtc.c Fri Aug 26 09:38:25 2016 (r304840)
+++ stable/11/sys/kern/subr_rtc.c Fri Aug 26 09:40:34 2016 (r304841)
@@ -172,11 +172,11 @@ resettodr(void)
if (disable_rtc_set || clock_dev == NULL)
return;
- mtx_lock(&resettodr_lock);
getnanotime(&ts);
timespecadd(&ts, &clock_adj);
ts.tv_sec -= utc_offset();
/* XXX: We should really set all registered RTCs */
+ mtx_lock(&resettodr_lock);
error = CLOCK_SETTIME(clock_dev, &ts);
mtx_unlock(&resettodr_lock);
if (error != 0)
More information about the svn-src-all
mailing list