Subject: Re: ps/2 mouse timeout problems
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 08/30/2002 20:41:30
On Fri, Aug 30, 2002 at 08:25:57PM +0200, Martin Husemann wrote:
> > yes - mono_time is fine, and really shouldn't go backwards
> > (except that you need to disable the clock interrupt while
> > you fetch it....)
>
> Well, theoretically yes. I'm not sure it is realy needed here.
> Many places in the kernel that do not care if they get the current
> or the previous result do it without protection.
I've just checked, all the calls except those in ufs/ufs/ufs_vnops.c
and ufs/ext2fs/ext2fs_vnops.c correctly call splclock() around
the accesses to mono_time.
Remember mono_time is 2 32bit integers, it is possible for them
to incremented after you have read one value and before reading
the other.
Of course on an MP system all bets are off!
(actually it may be worth re-instating the lbolt++ for MP drivers?)
David
--
David Laight: david@l8s.co.uk