Mail Archives: djgpp/2003/10/26/23:31:19
Hello,
> Ben Peddell <killer DOT lightspeed AT bigpond DOT com> wrote:
> : Since DOS does not support threads, neither does DJGPP.
>
> Somehow DJGPP supports threads anyway. See FAQ 22.4, subsection "*
> Multi-tasking libraries and OS kernels.
I am really surprised that absolutely no one has mentioned Richard
Dawe's pth threads port. The build also generates a pthreads.a. It
works beautifuly for PythonD, except for multi-threaded socket
scripts. This would require DJGPP-pth wrappers for critical Wattcp
functions, which no one has had the time to do (yet).
Richard's PTH port involved porting an old Linux JMP_BUF trick for
handling mutex. I have had no trouble reconfiguring the source
distribution to compile using Wattcp instead of libsocket. Basic
multi-threaded non-network related python scripts have been running
fine. The catch is that all Python's C modules (and any DJGPP
libraries they require) are recompiled as multi-threaded. Several GNU
packages (like libxml2) provide pthread-specific handlers.
About DOS threads 'just being simulated', aren't we splitting hairs?
Windows 95's "32 bit multitasking" is simulated, too (thunking all the
16 bit commands), but nobody in the real world cared, did they?
In conclusion, I think Richard's port pointed the correct way for
DJGPP.
Ben
- Raw text -