Re: timer.data

From: George Anzinger (george@pioneer.net)
Date: Tue Jun 20 2000 - 18:55:32 EST


Siddharth Kashyap wrote:
>
> Hi,
>
> I want to use the timer function to schedule a task after an interval. Can
> someone please explain me what is purpose of the data field in the
> linux/timer.h I can't make much sense of the comments.
>
The short answer is that it is passed to the function that is called
when the timer pops. Calling it a long int is possibly a bit short
sighted. ( void *) would seem better. On the other hand you can put
what ever you want here. The function would then use "data" to figure
out what, of all the things it does, it ought to do this time.

George

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:21 EST