[420] in Pthreads mailing list archive
Re: pthread_cancel
daemon@ATHENA.MIT.EDU (Stefan Grefen)
Wed Sep 25 04:35:04 1996
To: "Larry V. Streepy, Jr." <streepy@healthcare.com>
Cc: pthreads@MIT.EDU
Reply-To: grefen@carpe.net
Return-Receipt-To: <grefen@carpe.net>
In-Reply-To: "Larry V. Streepy, Jr."'s message <324807BC.4E600E82@healthcare.com> of Tue, 24 Sep 96 10:09:32 MDT.
Date: Wed, 25 Sep 1996 10:01:14 +0200
From: Stefan Grefen <grefen@carpe.net>
In message <324807BC.4E600E82@healthcare.com> "Larry V. Streepy, Jr." wrote:
> I sent mail last week to "proven@mit.edu" and have heard nothing back.
> So I'll try the "pthreads" alias.
Sometimes it takes some time till Chris answers.
>
> I really need pthread_cancel() and I notice that it is not implemented
> in the latest release of your pthreads code. Has it been implemented,
> even in beta form? Can you give me a general algorithm for implementing
> it? I don't know the internals of your pthreads package, so how to
> implement ptherad_cancel eludes me at the moment.
I've done that for 1.50 a long time ago.
I think I added flags to the thread structure indicating if the thread
is cancelable and if it has a cancelation pending.
If both are true, the next time a context switch was made to that thread
it did a normal pthread_exit procedure.
The you have to check if the thread is at a cancelation point, else
you might end up with dead-threads owning mutexes...
I can dig up my old backups with the mods, but I don't know if they
fit in the actual releases.
Stefan
>
> Thanks for any help.
>
> P.S. I sent a series of diffs for the Linux platform. Have these been
> looked at?
> --
> Larry V. Streepy, Jr.
> Chief Technical Officer, Healthcare Communications, Inc.
> mailto:streepy@healthcare.com
> (214) 851-7033 (Dallas Main #)
> (970) 626-5028 (My office #) (970) 626-4425 (Fax)
--
Stefan Grefen Am Grossberg 16, 55130 Mainz, Germany
grefen@carpe.net +49 6131 998566 Fax:+49 6131 998568
Living on Earth may be expensive, but it includes an annual free trip
around the Sun.