From owner-freebsd-hackers Wed Dec 2 10:53:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA22164 for freebsd-hackers-outgoing; Wed, 2 Dec 1998 10:53:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA22154 for ; Wed, 2 Dec 1998 10:53:17 -0800 (PST) (envelope-from lists@tar.com) Received: from ppro.tar.com (ppro.tar.com [204.95.187.9]) by ns.tar.com (8.9.1/8.9.1) with SMTP id MAA01941; Wed, 2 Dec 1998 12:52:58 -0600 (CST) (envelope-from lists@tar.com) Message-Id: <199812021852.MAA01941@ns.tar.com> From: "Richard Seaman, Jr." To: "eischen@vigrid.com" Cc: "freebsd-hackers@FreeBSD.ORG" Date: Wed, 02 Dec 98 12:52:57 -0600 Reply-To: "Richard Seaman, Jr." X-Mailer: PMMail 1.92 For OS/2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: pthread_cancel() function... Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 2 Dec 1998 13:23:54 -0500 (EST), Daniel Eischen wrote: >> It strikes me that the "pain in the you know what" part of this >> is the syscall wrapping -- though its more than syscalls involved. >> There are also some libc library functions that are manditory >> cancellation points too. >> >> If you wrap a syscall to make it a cancellation point, then each >> function in libc that calls the wrapped syscall becomes a cancellation >> point too. > >Do we really care about that? Isn't a single cancellation check >_before_ the system call is made good enough? I'm not sure I follow. If I understand, the specs say that the "read" function should be a cancellation point (as an example). If you make the read function a cancellation point (even if you just test for cancellation once, perhaps by calling pthread_testcancel) how do you prevent the other libc or libc_r functions that call read from becoming cancellation points too? The problem, as I see it, is that within libc and libc_r, a function that calls read will get the wrapped syscall, not the syscall itself, as it is currently implemented. Take "localtime" as an example. The implementation of localtime indirectly calls read. This will make localtime a cancellation point too, even though localtime is not a cancellation point defined in the specs. Or, am I just missing something here? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message