From: David H. <dho...@ca...> - 2001-03-13 17:33:33
|
I don't know whether anyone on this list has considered this idea, but I thought I'd put it up anyway: I've recently been having a look at writing an FB driver, and it occurs to me that it might be possible to control access to multiple virtual framebuffers by making use of the Linux VM system. Basically, when a framebuffer is active, the processes that use it would have the relevant virtual pages marked as "present" in the page table. When not active, the attached processes would have the same pages marked as "not present". This means that the "nopage" function on the VMA for the framebuffer would be called to load the page. This could send a SIGTTOU signal to indicate that the framebuffer is not available for use at the moment (rather than sending a SIGBUS signal, since the page can't be made available). A SIGCONT signal would then be automatically sent when the framebuffer becomes available again. Unless the SIGTTOU signal is trapped or ignored, this would suspend the process, and the SIGCONT signal would resume it. Cheers, David Howells |