[M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4

Jay K jay.krell at cornell.edu
Tue Apr 19 08:23:55 CEST 2011

> I think we need to post how the various threading models
> map to the various implementation platforms, and what
> options one needs to use to select between the models, and
> on which platforms a choice of threading model is
> available.

Win32 only offers Win32 threads.
That is the entire story for Win32.
User threads have never been provided for Modula-3 on Win32.
And probably never will. Though the idea isn't completely without merit.
You might experiment with Fibers or UMS, but nobody has done anything here I believe.

All other platforms offer user threads and pthreads.
Pthreads are the default on all other platforms.
  Except if we detect we are hosting on and targeting FreeBSD 4.x.
  (Not FreeBSD 1.x, 2.x, 3,x, but only 4.x.)
  Then we default to user threads.

To select user threads, you must edit m3-libs/m3core/src/thread/m3makefile and recompile everything.
Or no edit, rebuild m3core with cm3 -DNOPTHREAD, and then still recompile everything.
I believe you *cannot* just swap in one libm3core.so for another.
It'd be nice to be able to do that, but I think it'd require a change that I suspect Tony would reject.
I also would like an ability to select at link or execution time, but Tony definitely rejected that.
  You'd have to be sure to have indirection through function pointers, and the compiler could never
  inline lock usage. Not that it ever does today, but it might in the future.
  (Consider Win32 though: no inlining. And pthreads: generally abstract/opaque enough
  to not allow inlining?)

Really -- user threads hardly have reason to exist.
We need pthreads to work.

 - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110419/684d9927/attachment-0002.html>

More information about the M3devel mailing list