Help Porting Application To Linux

Mike Hearn mh at codeweavers.com
Thu May 6 05:32:50 CDT 2004


On Thu, 06 May 2004 09:49:33 +0200, MIKEL CARRASCO wrote:
> The main problem we are facing is communication between the GUI and the
> kernel. Under Windows we do so by means of shared memory (CreateFileMapping,
> ...) and we don't know very well how to do it in Linux. We have done some
> tests with Winelib and it seems like we are getting something.

Well, if you want the kernel to be pure Linux code then you could use
#ifdef LINUX or whatever in the frontend to just use the POSIX shared
memory APIs rather than the Win32 ones. That is probably the easiest route
unless you wish to keep the code completely free of ifdefs.
 
> However, later on we need our kernel to run as a real time task by means
> of RTAI, and we don't know if that is even possible with Wine/Winelib.
> Anybody knows if such a thing is possible?

What is RTAI? Realtiming a task in Linux is certainly possible but you
need to be root to do it. I'm not sure that Wine implements this, you
could have to do it using the right Linux calls. There was a thread on
this last year, I think. 

> Another possible solution we've been thinking of is to tweak the
> Wineserver, so it does the file mapping the way we want (place in
> memory, format, etc.) and we can read/write it from our application's
> kernel using plain C functions.

I think this would be suboptimal: assuming your frontend code is
reasonably modular why not just refactor things so you have a backend
object that you can subclass with the right shared memory APIs for Linux
and Win32?
 
thanks -mike




More information about the wine-devel mailing list