Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 1998 08:26:57 +1100 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        eischen@vigrid.com (Daniel Eischen)
Cc:        jb@cimlogic.com.au, lists@tar.com, eischen@vigrid.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: pthread_cancel() function...
Message-ID:  <199812022126.IAA10350@cimlogic.com.au>
In-Reply-To: <199812022058.PAA02860@pcnet1.pcnet.com> from Daniel Eischen at "Dec 2, 98 03:58:53 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote:
> > I don't think it is sufficient to just add what you call "wrappers".
> > AFAIK, the thread cancellation is supposed to occur at any time while
> > the thread is in one of the specified functions, not just at the beginning
> > or at the end. This means that code is required to check the thread
> > state and do things conditionally on that.
> 
> Yech!  You're talking only about cancellable libc routines, though,
> right (system calls have no concept of userland thread states)?

Well, as far as the standard is concerned, there is no distinction between
libc routines and syscalls - that's just part of the implementation.
Of the required cancellation points, most are already wrappered syscalls.
The list of functions that are allowed to contain cancellation points
appears to contain traditional libc functions that are written in terms
of the required cancellation points. I guess this is why the standard
allows for them. The bit that scares me, though, is all the rest. And
then there is the user code. What happens when a programmer relies on a
particular cancellation implementation in Solaris and ours behaves
slightly differently? (I know the answer to this 8-)

-- 
John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812022126.IAA10350>