[M3devel] State of threads? pthreads not safe to use on some platforms?

Mika Nystrom mika at async.caltech.edu
Mon Apr 18 21:01:44 CEST 2011


If you have a copy, can you try the thread tester program on it?

    Mika

=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:
>First implementation of pthreads for m3 was made for pm3 in December of =
>2004... To the best of my knowledge, it was correct. As long as  you do =
>not define correct like "repetitive behaviour of green threads". I used =
>it to run DC++ hub I wrote as a pet project for stress testign it. =
>Worked well.
>
>On Apr 18, 2011, at 8:37 PM, Mika Nystrom wrote:
>
>> I don't think the pthreads implementation has ever been 100% correct.
>>=20
>> If it has, please let me know which CVS date to check out!!!  (I use a
>> PM3 that is almost ten years old simply because this stuff works and =
>am
>> happy to work with ANYTHING newer that works.)
>>=20
>> As far as user ("green") threads goes, I think they *may* be right if =
>you
>> are careful not to link with -pthread.  This means you have to change =
>RTThreadC.c
>> (remove pthread_atfork) or your program won't link.
>>=20
>> (Please don't call pthreads "Posix" threads on this list: I know it is
>> correct but it is confusing because Modula-3's user threads =
>implementation
>> for Unix is called "POSIX"---i.e., as opposed to "WIN32".  Modula-3 =
>usage=20
>> predates IEEE/ISO standardization of threads so there was no confusion =
>at=20
>> the time the name was introduced.)
>>=20
>>    Mika
>>=20
>> =3D?utf-8?Q?Dragi=3DC5=3DA1a_Duri=3DC4=3D87?=3D writes:
>>> But, what recent change when my now problematic platform is on =3D
>>> 5.8.6....?
>>>=20
>>> On Apr 17, 2011, at 8:13 PM, Tony Hosking wrote:
>>>=20
>>>> =3D20
>>>> On Apr 17, 2011, at 1:34 PM, Hendrik Boom wrote:
>>>> =3D20
>>>>> On Sun, Apr 17, 2011 at 12:43:16PM -0400, Tony Hosking wrote:
>>>>>> So the question is what has changed.
>>>>>> I know threads were functional and stable at one point.
>>>>> =3D20
>>>>> Was that back when they were green threads?
>>>> =3D20
>>>> User threads have historically been pretty stable, and I believe =
>still =3D
>>> are.
>>>> Similarly, our use of pthreads was stable at one point but there =
>have =3D
>>> been recent changes that appear to have degraded them.
>>>> =3D20
>>>>> Has our use of posix threads ever been stable?
>>>>> Are green threads still available?
>>>>> =3D20
>>>>> -- hendrik
>>>> =3D20



More information about the M3devel mailing list