This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cancellation points


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 the
Solaris reference
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
the thread
cancellation occurs in a call to pthread_mutex_lock(), the mutex that was
being locked
returns EBUSY when destroyed with pthread_mutex_destroy().  Has anyone else
seen this happen?  

Thanks for any help,
Simon Gerblich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]