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@
This commit is contained in:
Ian Lepore 2018-01-16 23:18:52 +00:00
parent 428cdf0280
commit e780324662
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328069

View File

@ -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;