mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Remove double-calls to tc_get_timecount()
to warm timecounters. It seems that second call does not add any useful state change for all implemented timecounters. Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
This commit is contained in:
committed by
Moyano, Gabriel
parent
eb909371c7
commit
62c428f241
@@ -1376,7 +1376,6 @@ tc_init(struct timecounter *tc)
|
|||||||
return;
|
return;
|
||||||
#ifndef __rtems__
|
#ifndef __rtems__
|
||||||
(void)tc->tc_get_timecount(tc);
|
(void)tc->tc_get_timecount(tc);
|
||||||
(void)tc->tc_get_timecount(tc);
|
|
||||||
#endif /* __rtems__ */
|
#endif /* __rtems__ */
|
||||||
timecounter = tc;
|
timecounter = tc;
|
||||||
#ifdef __rtems__
|
#ifdef __rtems__
|
||||||
@@ -1692,7 +1691,6 @@ sysctl_kern_timecounter_hardware(SYSCTL_HANDLER_ARGS)
|
|||||||
|
|
||||||
/* Warm up new timecounter. */
|
/* Warm up new timecounter. */
|
||||||
(void)newtc->tc_get_timecount(newtc);
|
(void)newtc->tc_get_timecount(newtc);
|
||||||
(void)newtc->tc_get_timecount(newtc);
|
|
||||||
|
|
||||||
timecounter = newtc;
|
timecounter = newtc;
|
||||||
|
|
||||||
@@ -2247,7 +2245,6 @@ inittimecounter(void *dummy)
|
|||||||
|
|
||||||
/* warm up new timecounter (again) and get rolling. */
|
/* warm up new timecounter (again) and get rolling. */
|
||||||
(void)timecounter->tc_get_timecount(timecounter);
|
(void)timecounter->tc_get_timecount(timecounter);
|
||||||
(void)timecounter->tc_get_timecount(timecounter);
|
|
||||||
mtx_lock_spin(&tc_setclock_mtx);
|
mtx_lock_spin(&tc_setclock_mtx);
|
||||||
tc_windup(NULL);
|
tc_windup(NULL);
|
||||||
mtx_unlock_spin(&tc_setclock_mtx);
|
mtx_unlock_spin(&tc_setclock_mtx);
|
||||||
|
|||||||
Reference in New Issue
Block a user