svn commit: r303385 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Wed Jul 27 11:34:26 UTC 2016
Author: kib
Date: Wed Jul 27 11:34:25 2016
New Revision: 303385
URL: https://svnweb.freebsd.org/changeset/base/303385
Log:
Reduce the resettodr_lock scope to only CLOCK_SETTIME() call.
Tested by: pho (as part of the whole patch)
Reviewed by: jhb (same)
Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
X-Differential revision: https://reviews.freebsd.org/D7302
Modified:
head/sys/kern/subr_rtc.c
Modified: head/sys/kern/subr_rtc.c
==============================================================================
--- head/sys/kern/subr_rtc.c Wed Jul 27 11:33:33 2016 (r303384)
+++ head/sys/kern/subr_rtc.c Wed Jul 27 11:34:25 2016 (r303385)
@@ -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