Load the current timecounter into tc. The timecounter global can change

at any time and we do not want to call one timercounter's function with
another timecounter's structural pointer.

MFC after:	3 days
This commit is contained in:
Matthew Dillon 2002-02-18 19:49:30 +00:00
parent 978d3bfe9c
commit 3e1ce344ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90867

View File

@ -199,8 +199,9 @@ add_timer_randomness(struct random_bucket *r, struct timer_rand_state *state,
int delta, delta2;
u_int nbits;
u_int32_t time;
struct timecounter *tc = timecounter; /* can change at any time */
num ^= timecounter->tc_get_timecount(timecounter) << 16;
num ^= tc->tc_get_timecount(tc) << 16;
r->entropy_count += 2;
time = ticks;