Author: ian
Date: Tue Jan 16 23:18:52 2018
New Revision: 328069
URL: https://svnweb.freebsd.org/changeset/base/328069
Log:
Remove redundant critical_enter/exit() calls. The block of code delimited
by these calls is now protected by a spin mutex (obscured within the
RTC_LOCK/RTC_UNLOCK macros).
Reported by: bde@
Modified:
head/sys/x86/isa/atrtc.c
Modified: head/sys/x86/isa/atrtc.c
==============================================================================
--- head/sys/x86/isa/atrtc.c Tue Jan 16 23:14:12 2018 (r328068)
+++ head/sys/x86/isa/atrtc.c Tue Jan 16 23:18:52 2018 (r328069)
@@ -370,7 +370,6 @@ atrtc_gettime(device_t dev, struct timespec *ts)
mtx_lock(&atrtc_time_lock);
while (rtcin(RTC_STATUSA) & RTCSA_TUP)
continue;
- critical_enter();
RTC_LOCK;
bct.sec = rtcin_locked(RTC_SEC);
bct.min = rtcin_locked(RTC_MIN);
@@ -382,7 +381,6 @@ atrtc_gettime(device_t dev, struct timespec *ts)
bct.year |= rtcin_locked(RTC_CENTURY) << 8;
#endif
RTC_UNLOCK;
- critical_exit();
mtx_unlock(&atrtc_time_lock);
/* dow is unused in timespec conversion and we have no nsec info. */
bct.dow = 0;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"