lkml.org 
[lkml]   [1998]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Polling ? :-(
   Date: 	Tue, 16 Jun 1998 10:23:22 +0530
From: sameer <sameer@multitech.co.in>

Currently I 'm writing a driver for a multi port serial
interface card on 2.0.0 as a module. The card interrupts only when data
is to be received or on detection of any changes in modem signals but
not when data needs to be transmitted :-( This would make it necessary
for a polling routine to be written which would tx data to the ports
which have data pending in their trasmit buffers....

What would be the best way to hook up such a polling routine?

The easist way is to simply use the add_timer/del_timer interface. See
the second half of /usr/src/include/linux/timer.h for more details.

You'll have to reinstall add_timer each time the timer runs, but this
will allow you to figure out when the next time your timer routine
should run, and adjust the time in the timer_struct accordingly.

Hope this helps.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.036 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site