This is the mail archive of the
mailing list for the pthreas-win32 project.
RE: Cancellation points
- From: "Alexander Terekhov" <TEREKHOV at de dot ibm dot com>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Thu, 19 Dec 2002 14:00:31 +0100
- Subject: RE: Cancellation points
> pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL)
that's incorrect. Don't do this.
Simon Gerblich <email@example.com>@sources.redhat.com on
12/19/2002 01:28:57 AM
Sent by: firstname.lastname@example.org
Subject: RE: Cancellation points
I've tried the current CVS version and built the VC, VCE and VSE libraries
and they all pass the test suite.
Exception2.exe poped up an exception message for the VC and VSE library and
printed out a message for the VCE library.
My problem with pthread_mutex_lock being a cancelation point is fixed as
I'm using Visual C++ 6.0 SP5 on Windows 2000.
> -----Original Message-----
> From: Ross Johnson [SMTP:email@example.com]
> Sent: Tuesday, December 17, 2002 6:44 PM
> To: firstname.lastname@example.org
> Subject: Re: Cancellation points
> I've changed pthread_mutex_lock() in CVS to use a non-cancelable
> version of sem_wait(). I may not be able to build or test it myself
> for a day or so. Can someone grab the current CVS version, build the
> library, run the test suite, and report success or failure to the
> list please.
> Otherwise I'll test it myself ASAP.
> Ross Johnson wrote:
> > Hi Simon,
> > Sleep() [with uppercase 'S'] is definitely not a cancelation point -
> > only functions included with pthreads-win32 can be cancelation points.
> > The POSIX function sleep() isn't provided by pthreads-win32 either.
> > See the Conformance section of the ANNOUNCE file for all functions that
> > have been implemented. Any of those that should be cancelation points
> > Re pthread_mutex_lock(), Thomas Pfaff discovered this bug only a few
> > days ago and tracked it down (to an error of mine). I will fix it and
> > drop it into CVS ASAP.
> > Thanks.
> > Ross
> > Simon Gerblich wrote:
> >> Hi,
> >> I'm having some problems working out which functions are cancellation
> >> points
> >> when using
> >> pthread_cancel() with pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,
> >> NULL).
> >> I'm using pthreadsVC.dll on Windows 2000.
> >> Is Sleep() meant to be a cancellation point in WIN32? I've read in
> >> Solaris reference
> >> manual that sleep() and usleep() are cancellation points for pthreads
> >> Solaris, but can
> >> not find a list of cancellation points for pthreads on WIN32.
> >> Also pthread_mutex_lock() is acting as a cancellation point in my
> >> code. I
> >> have to put
> >> pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL) before my
> >> calls to pthread_mutex_lock to stop it acting as a cancellation
> >> point. If
> >> the thread
> >> cancellation occurs in a call to pthread_mutex_lock(), the mutex that
> >> being locked
> >> returns EBUSY when destroyed with pthread_mutex_destroy(). Has anyone
> >> else
> >> seen this happen?
> >> Thanks for any help,
> >> Simon Gerblich