In article <[EMAIL PROTECTED]>, Poul-Henning Kamp <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, John Polstra writes: > >I don't follow that. As I read the code, the "current" timecounter > >is only advanced every second -- not every 1/HZ seconds. Why should > >more of them be needed when HZ is large? > > No, only if you have set tco_method to one, if tco_method is zero (default) > we update the timecounter every HZ.
Oh, you're right. Sorry, I misread the code. My tco_method is 0, so it will do the update every HZ. > Could you try this combination: > > NTIMECOUNTER = HZ (or even 5 * HZ) > tco_method = 0 > no splhigh protection for microuptime() ? Yep, I'll try that. > If I do > extern volatile struct timecounter *timecounter; > > microtime() > { > struct timecounter *tc; > > tc = timecounter; > > The compiler complains about loosing the volatile thing. > > How do I tell it that it is the contents of the "timecounter" pointer which > is volatile, but now what it points at ? You want: extern struct timecounter *volatile timecounter; and also change the definition of the variable in the .c file. You won't get any warnings from that. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message