Note: my responses might not be accurate:
Quote:
Originally Posted by
iamjayanth
1. What is time_after() function ? It is used in the actual serial mouse driver for kernel 2.6.9. Below given is the line where it is used
if (time_after(jiffies, my_mouse->last + HZ/10))
my_mouse->count = 0;
Jiffies, as you noted, is the global clock tick in Linux. So this says, if it's now later that the last state-change of the mouse (within one-tenth of HZ), reset the mouse's "count", whatever that is. You could user > or < than or whatever here, except for the fact that sometimes, the jiffies parameter will wrap around -- it can do this on 32-bit machines if running longer than, say, a [strike]year[/strike] day. This function supposedly handles that case. See this thread:
http://marc.info/?l=linux-kernel&m=101406885521792
Quote:
2. ... So What I understand is that when we connect the serial mouse the input sub system automatically initializes this structure
I don't know. Sorry.
Quote:
3. ... In the both definition the label UL is used which I believe(?) stands for unsigned long.
Correct.
Quote:
What my doubt is that why ff (small letter) and FF(capital letter ) is used . What is the difference between these two .
None. Absolutely none.
All hex digits are the numbers 0 through 9 and A through F. In C, and in most programming languages, it doesn't matter if the letter if upper or lowercase.