[Mono-list] Re: solution for Thread::Abort()

Dietmar Maurer dietmar@ximian.com
08 Aug 2002 18:55:56 +0200

On Thu, 2002-08-08 at 18:07, Dick Porter wrote:

> I intend to implement SuspendThread() and ResumeThread() using signals.
> See http://home.earthlink.net/~anneart/family/Threads/code/susp.c for
> the example code from "Programming with POSIX threads" that demonstrates
> the technique.  Note that a suspended thread blocks inside the signal
> handler.

it seems that SIGUSR is used inside linuxthreads, but maybe only for
older kernels.

- Dietmar

/* The _old variants are for 2.0 and early 2.1 kernels which don't have RT
   On these kernels, we use SIGUSR1 and SIGUSR2 for restart and cancellation.
   Since the restart signal does not queue, we use an atomic counter to create
   queuing semantics. This is needed to resolve a rare race condition in
   pthread_cond_timedwait_relative. */