Thread (11 messages) 11 messages, 4 authors, 2003-03-17

Re: Finding Aki M Laukkanen's VESAFBD project?

flat view

From: Jon Smirl <hidden>
Date: 2003-03-14 23:22:56

You can do it either way. With blocking IO you would
need one thread per adapter. With the signal method
you can be single threaded and sleep waiting for a
signal. Both styles will work.

With single threaded you make an array of handles for
the framebuffers. When you get a signal you do poll()
on the array. For each active poll you will need to do
the IOCTL. Keep looping on poll/IOCTL until the poll
goes inactive, then sleep waiting for a SIGIO.
--- Kendall Bennett <KendallB@scitechsoft.com> wrote:
Jon Smirl [off-list ref] wrote:
quoted
I noticed the email but I wasn't sure if you knew
about the code
quoted
from the way your mail was worded. 
;-)
quoted
I used fasync and poll to implement user space
communications in a
quoted
driver I just finished.  Use kill_fasync(&fasync,
SIGIO) from the
quoted
device driver to signal the user app. The signal
causes the app to
quoted
poll which the driver replies POLLIN to. Polling
identifies which
quoted
device caused the signal. Now the user app knows
it needs to IOCTL
quoted
the handle to do whatever the driver needs it to.
It only takes
quoted
about 100 lines of code to implement the
communication. 

Does the user space daemon block waiting to be woken
up from the kernel 
module? I think the way Aki had it done initially
was to have the user 
space daemon call into the kernel via an ioctl() or
something, and the 
kernel would block on that thread and when something
needed to be done, 
it would fill in the return structure for the
ioctl() and then unblock 
the thread. The user space daemon would process the
ioctl() and and then 
call it agin once the service was completed.

Does that system make sense at all?

Thanks!

---
Kendall Bennett
Chief Executive Officer
SciTech Software, Inc.
Phone: (530) 894 8400
http://www.scitechsoft.com

~ SciTech SNAP - The future of device driver
technology! ~


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge
is now open! 
Get cracking and register here for some mind
boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel


=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help