[M3devel] Threads summary for m3gdb

Olaf Wagner wagner at elegosoft.com
Thu Aug 9 10:53:53 CEST 2007


On Thu, August 9, 2007 01:20, Rodney M. Bates wrote:
> I have been doing some work on m3gdb lately and am mulling over
> trying to improve the very rudimentary thread support.  With
> the new thread implementation, it is a good time.  I would like
> confirmation (or correction) of the following impressions I have
> gotten about thread handling in implementations of Modula-3.
>
> Here's what I think I understand:
>
> The old system uses threads entirely implemented in libm3core,
> using setjmp/longjmp to get execution moved around where it is
> needed.

This is true for the POSIX platforms; on Windows, always native
system threads have been used.

> The new system, called for by -DPTHREAD  uses the pthreads library
> instead.
>
> There is no use of any kind of kernel threads.

Pthreads interfaces may be mapped to kernel threads, depending on
the operating system and its configuration.

> The old thread system is tied to the older GC, which requires that
> system-dependent wrappers be used for many OS system calls.

I don't think this is correct. GC changes are independent of the
threads changes (though both were done by Antony Hosking). He may
correct me of course.

> The new thread system is tied to the new GC, which doesn't need
> the wrappers, but has the compiler inserting calls to the GC in
> a few places.
>
> Is this all correct?

See above,

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
   http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list