[fpc-pascal] Threading in FPC DOS
Vinzent Hoefler
JeLlyFish.software at gmx.net
Wed Jul 12 11:56:18 CEST 2006
On Wednesday 12 July 2006 09:15, Tomas Hajny wrote:
> Well, multitasking <> multithreading. I'm not sure if DV or Win 3.x
> provide special multithreading support for DOS applications...
Nope, not really (at least for Win3.x). There are some services to aid
multi-tasking-aware applications at the multiplexer interrupt Marco
mentioned, but multi-threading is simply not supported by the
underlying DOS-Kernel because of its non-reentrancy.
> In
> contrary to Marco's suggestion, I can imagine the multithreading
> support could be general and included by default for GO32v2
> (similarly to Win32). However, it certainly depends on whether a
> general solution (not requiring special support like DV, etc.) is
> really feasible and practical.
Well, once you manage to encapsulate each and every system call you've
done the most work. ;) Basically I only see the solution that the
thread manager intercepts int21h and probably some more others (int10h
comes to mind), and blocks any multiple system calls from occuring at
the same time. But it's too hot to think right now.
All in all, I'd say, it's not *that* hard to do it, especially if you
have a multi-threading aware RTL already, but it's certainly not done
in a couple of hours.
The thing is, I'd really love to do that, but as anyone here might have
noticed, I already did a pi*s-poor job just maintaining the GO32V2
target...
Vinzent.
More information about the fpc-pascal
mailing list