This is the mail archive of the
mailing list for the pthreas-win32 project.
Re: Cancellation points
- From: Ross Johnson <rpj at ise dot canberra dot edu dot au>
- To: Simon Gerblich <sgerblich at daronmont dot com dot au>
- Cc: pthreads-win32 at sources dot redhat dot com
- Date: Tue, 17 Dec 2002 18:23:41 +1100
- Subject: Re: Cancellation points
- Organization: University of Canberra, Management and Technology
- References: <8179ED123ECCD611A5490000F822E6EA061B27@pd001649.daronmont.com.au>
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
See the Conformance section of the ANNOUNCE file for all functions
that have been implemented. Any of those that should be cancelation
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.
Simon Gerblich wrote:
I'm having some problems working out which functions are cancellation points
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 the
manual that sleep() and usleep() are cancellation points for pthreads on
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
cancellation occurs in a call to pthread_mutex_lock(), the mutex that was
returns EBUSY when destroyed with pthread_mutex_destroy(). Has anyone else
seen this happen?
Thanks for any help,