Winelib and static-build
Dan Kegel
dank at kegel.com
Sat Oct 25 15:13:16 CDT 2008
On Sat, Oct 25, 2008 at 8:10 AM, Alan Nisota <alannisota at gmail.com> wrote:
> Very cool. Here is what I did:
> In linux (host):
> use shm_open and ftruncate to create a shared-memory region (this will be at
> /dev/shm/<name> in linux)
> use mmap to map that into memory
> create a socket to use as a semaphore
>
> In the windows executable:
> use CreateFile to open Z:\dev\shm\<name>
> use CreateFileMapping and MapViewOfFile to map that into memory
> open the above socket
>
> I can now pass info back and forth between wine and linux via shared memory,
Sweet! I had forgotten about /dev/shm.
> The next question is whether this can be made more portable so it could be
> used on Mac as well (I've yet to be able to make my loader work on Mac, and
> this theoretically could if I could figure out how to use something like
> tmpfs there). I am not knowledgable about whether BSD/OSX has anything
> equivalent to tmpfs.
I just looked a bit, and it doesn't quite look like MacOSX's
shm_open creates a visible file in the same way it does on Linux.
So I'm not as optimistic there...
- Dan
More information about the wine-devel
mailing list