From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3200 invoked by alias); 3 Jun 2002 04:35:30 -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 3180 invoked from network); 3 Jun 2002 04:35:29 -0000 Received: from unknown (HELO digit.ise.canberra.edu.au) (137.92.140.41) by sources.redhat.com with SMTP; 3 Jun 2002 04:35:29 -0000 Received: from ise.canberra.edu.au (localhost.localdomain [127.0.0.1]) by digit.ise.canberra.edu.au (8.11.6/8.11.6) with ESMTP id g534Yrl31692; Mon, 3 Jun 2002 14:34:54 +1000 Message-ID: <3CFAF1ED.900@ise.canberra.edu.au> Date: Sun, 02 Jun 2002 21:35:00 -0000 From: Ross Johnson Organization: University of Canberra, Information Sciences and Engineering User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rob Fanner CC: pthreads-win32@sources.redhat.com Subject: Re: semaphores References: <430F887D415DD1118C2700805F31ECF106B591B1@sota0005.cognos.com> <3CF70ACF.902@ise.canberra.edu.au> <003601c20877$51262520$0c01a8c0@thor> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002/txt/msg00072.txt.bz2 Rob Fanner wrote: > this might be a good alternative > > if ( ReleaseSemaphore( (*sem)->sem, GREATER_THAN_MAXIMUM_SEM_VALUE, > &value) ) > { > *sval = value; > } > > Sorry that I've not hacked this into the source and sent you a correct > patch, but I'm still not confident with VC++ builds, and > I'm still a bit clueless as to how to set up a pthreadVCE.lib (which I need) > as opposed to a pthreadVC.lib (the standard > build for the distro's .dsp file). Great! Unless there are any problems with this, it will go into the next snapshot. Re pthreadVCE.lib, if you've built the pthreadVC.lib version successfully using the .dsp file, you should only need to add the following compiler flags:- /GX /TP /D__CLEANUP_CXX to build pthreadVCE.lib/.dll (and change the names of your output files of course). I don't recall off-hand what /TP does, but it's included with the other flags in the Makefile. This is what I use for the pre-built libs. If you're using pthreadVCE.lib then you should also be defining __CLEANUP_CXX for your application build, so that the appropriate sections of pthread.h are included. You may be interested in reading Q4 and Q5 in the pthreads-win32 FAQ file at:- ftp://sources.redhat.com/pub/pthreads-win32/FAQ or the section "SNAPSHOT 2002-03-02 / Cleanup code default style" at:- http://sources.redhat.com/pthreads-win32/news.html This will explain why the build defaults to pthreadVC. For additional information, the problems/issues have been discussed on the mailing list a couple of times, the most recent thread starts at:- http://sources.redhat.com/ml/pthreads-win32/2001/msg00143.html Regards. Ross