lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Stefano Lanzavecchia <stf@apl.it> wrote:
> 
> > There's one downside of this:  The coroutines will be optional
> > because they can't be implemented in a portable way.  It requires
> > a couple of lines of assembler code.  Currently supported are
> > x86 Linux and FreeBSD.
> 
> Do you think it would be hard to port it to Win32? I just had a look at
> coro.c and the assembler doesn't look too scary (I used to write assembler
> x86 when I was a kid) and apart from that there is only a suspicious call to
> mmap().

I took the `x86-linux' stuff and ported it to DJGPP (DOS) using
`malloc' instead of `mmap', and fixed (commented out) a couple of
lines of assembler, and it seemed to work fine.  Then I compiled the
same source under Mingw32 (Windows) and it seemed to work too.

I'll send a patch soon.  Only problem is the build system doesn't
work without Unix tools (which I have but others probably won't).

-- 
tjaden@psynet.net - http://www.psynet.net/tjaden/