[M3devel] nt386gnu threads?
Tony Hosking
hosking at cs.purdue.edu
Mon Jan 28 17:02:25 CET 2008
On Jan 28, 2008, at 6:29 AM, Jay wrote:
> Can anyone confirm my read that PM3's NT386GNU used user/vtalarm
> threads?
Indeed. Pthread support has only been available in CM3 since I
started on it in in 2006. Thus, unless it was using Win32 threads it
had to have been SIGVTALRM based (ie, implemented as in ThreadPosix.m3).
> PM3 appears to have no PThread support ant its NT386GNU appears to
> have OS_TYPE=POSIX.
> Heck, even its NT386 has OS_TYPE=POSIX, but its NT386 is probably
> dead/broken.
>
> 1) I'm too lazy to tediously rewrite Cygwin's pthread.h et. al.
> into Modula-3.
I am unfamiliar with Cygwin pthread support. Are they layered on
win32 threads? It is not terribly hard to write Upthread.i3 and
friends.
> 2) The thread library you pick is not an independent decision.
> The Modula-3 File I/O libraries interact with the threading
> library at least a little bit.
The POSIX file IO libraries are known to function with both
ThreadPThread and ThreadPosix (SIGVTALRM). Thus, you should be able
to use them cleanly if the Cygwin-based Modula-3 implementation takes
on a purely/mainly POSIX personality (as many of us have argued it
should!).
> The path of less resistance seems to be user/vtalarm threads for
> now, until
> such time as Cygwin Upthread.i3 is written.
Yes, indeed.
> (That is, neither pthreads nor win32 satisfied my laziness; I'm
> going to try user/vtalarm threads, see how it goes; I'm sure they
> aren't very good, but...)
Certainly, you won't get any multicore benefit with SIGVTALRM-based
threads.
More information about the M3devel
mailing list