From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17722 invoked by alias); 17 Dec 2002 07:24:28 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 17715 invoked from network); 17 Dec 2002 07:24:25 -0000 Received: from unknown (HELO digit.ise.canberra.edu.au) (137.92.140.41) by 209.249.29.67 with SMTP; 17 Dec 2002 07:24:25 -0000 Received: from ise.canberra.edu.au (localhost.localdomain [127.0.0.1]) by digit.ise.canberra.edu.au (8.12.5/8.12.5) with ESMTP id gBH7NfSN005932; Tue, 17 Dec 2002 18:24:20 +1100 Message-ID: <3DFED0FD.3030209@ise.canberra.edu.au> Date: Mon, 16 Dec 2002 23:24:00 -0000 From: Ross Johnson Organization: University of Canberra, Management and Technology User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Simon Gerblich CC: pthreads-win32@sources.redhat.com Subject: Re: Cancellation points References: <8179ED123ECCD611A5490000F822E6EA061B27@pd001649.daronmont.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002/txt/msg00123.txt.bz2 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 are. 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 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