Re: [RFC] Virtual 8086 mode support for kernel drivers
Jan Klötzke <[email protected]> Thu, 15 May 2008 20:11:40 +0200
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
"Axel Dörfler" <[email protected]> wrote: > > I also understood your proposal that way. But as a generic facility > > it could > > be used by other drivers as well (even though I have no other usecase > > yet ;-) ). If a driver/module registers a page_fault_callback for > > longer > > times (e.g. across syscalls) and a unhandled page fault happes in the > > kernel > > then the page_fault_callback address would be used in the old > > fault_handler > > address sense and would not lead to a panic. Therefore I chose to > > make it > > explicit... > > I don't really see any usage case for this, though - and even if there > is one, the current fault handler mechanism should be sufficient IMO. Ok, as I don't have a real usecase too I make it a anonymous union just as Ingo has suggested. > > > BTW, I believe it is preferrable to add only *.cpp files in the > > > kernel. We > > > have a few headers that are quite messy, since they actually use C+ > > > + > > > features, but are included by *.c files. We are (very slowly) > > > renaming *.c > > > files to *.cpp, and I was hoping we would be able to clean up the > > > headers > > > one day. > > > > Ok. Then maybe it's also an option to merge the struct vm86_state and > > the vm_* > > functions into a class? What's the direction Haiku is heading in this > > respect? > > In the kernel itself, you can do what you prefer - the only rule is > that we currently only export C API. I renamed vm86.c to .cpp but left the exported functions 'extern "C"'. Despite the changes above I cleaned the code up a bit, reworked all the remarks that I received so far and added some comments. The code is finished so far and I will move on to the VESA driver. Should I submit the current patch series now on the list or (as it's not used by other code yet) when I have the VESA driver/accelerant stuff working? /Jan ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Open-beos-kernel-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/open-beos-kernel-devel