From owner-freebsd-arch Sat Sep 29 11:17:38 2001 Delivered-To: freebsd-arch@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id 1BC5F37B409 for ; Sat, 29 Sep 2001 11:17:35 -0700 (PDT) Received: from mindspring.com (dialup-209.245.140.105.Dial1.SanJose1.Level3.net [209.245.140.105]) by snipe.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f8TIHTa01519; Sat, 29 Sep 2001 11:17:30 -0700 (PDT) Message-ID: <3BB6106A.A44644BB@mindspring.com> Date: Sat, 29 Sep 2001 11:18:18 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen Cc: Alfred Perlstein , Julian Elischer , arch@FreeBSD.ORG Subject: Re: KSE next steps... References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel Eischen wrote: [ ... pthread_kill ... ] > Think of this as kill() on a process; it shouldn't be too different. > If PCATCH is specified in the tsleep, then it is terminated immediately, > otherwise it just remains pending until (and if) it is checked at a > later point in time. Regardless of whether PCATCH is specified, the > thread never returns to userland. The UTS is notified through an > upcall in the same way that it would be if a thread blocked (but with > a different completion status). You need to read the manual page for pthread_kill(3P). Minimally, #include int pthread_kill(pthread_t thread, int sig); ...meaning that you can send _any_ signal, not just "SIGINT". The delivery is to a specific thread. This pretty much means triggering the EINTR cancellation, but doing the delivery in user space to a particular thread. The cancellation aspect assumes, of course, that SA_RESTART isn't specified (and/or siginterrupt(2) wasn't called). AIX has a nice brokeness in pthread_signal(3P), which results in MySQL and other programs which use it having a tough time. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message