[fpc-devel] Multithreading under DOS
Sven Barth
pascaldragon at googlemail.com
Thu Sep 26 15:30:03 CEST 2013
On 26.09.2013 14:23, Tomas Hajny wrote:
> On Thu, September 26, 2013 14:11, Sven Barth wrote:
>> On 26.09.2013 13:28, Tomas Hajny wrote:
>>> On Thu, September 26, 2013 11:55, Michael Schnell wrote:
>>>> In fact here seems to be a library that might be usable:
>>>>
>>>> http://www.arl.wustl.edu/~fredk/Courses/OS/wuthreads.html
>>>
>>> All of your links refer to Unix (or even explicitly Linux). Even just
>>> the
>>> definition of "kernel space" and "user space" gives different results
>>> for
>>> DOS and POSIX. Moreover, then end of
>>> http://www.e-reading.mobi/chapter.php/143358/128/Tanenbaum_-_Distributed_operating_systems.html
>>> suggests that pre-emptive multithreading is hardly possible (if at all)
>>> with pure user space implementation; FPC TThread design is based on an
>>> assumption of a pre-emptive multithreading.
>>
>> Well, we do have a TThread.Yield procedure since the last time I worked
>> on TThread :)
>
> Well, that is nice, but I haven't seen a statement (with an appropriately
> big exclamation mark ;-) ) about all started threads using this API being
> required to call this procedure regularly...
I believe that we can agree that if someone wants to port an application
to a system that provides only cooperative multithreading that he/she
needs to ensure that his/her threads call Yield regularly. :) Afterall
our main targets are preemptive ones...
Regards,
Sven
More information about the fpc-devel
mailing list