From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22689 invoked by alias); 30 May 2002 16:38:39 -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 22629 invoked from network); 30 May 2002 16:38:34 -0000 Received: from unknown (HELO mail.twc-online.net) (66.8.86.35) by sources.redhat.com with SMTP; 30 May 2002 16:38:34 -0000 Received: from mondriaan.stonethree.com (cache-1.twc-online.net [66.8.86.58]) by mail.twc-online.net (8.11.3/8.11.3) with ESMTP id g4UGcYR25888; Thu, 30 May 2002 18:38:34 +0200 Received: from thor (thor.stonethree.com [192.168.1.12]) by mondriaan.stonethree.com (8.11.0/8.11.0) with SMTP id g4UGcR302171; Thu, 30 May 2002 18:38:27 +0200 Message-ID: <011a01c207f8$4517b2a0$0c01a8c0@thor> From: "Rob Fanner" To: "Bossom, John" , References: <430F887D415DD1118C2700805F31ECF106B591B1@sota0005.cognos.com> Subject: Re: semaphores Date: Thu, 30 May 2002 09:38:00 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0117_01C20809.08942690" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-SW-Source: 2002/txt/msg00069.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0117_01C20809.08942690 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 717 I've found the problem. It looks like the pthreads-win32 coders already know about it, as it is commented in the set_getvalue.c source file: /* Note: * The windows NT documentation says that the increment must be * greater than zero, but it is set to zero here. If this works, * the function will return true. If not, we can't do it this way * so flag it as not implemented. */ It has to do with the differences between the Win98 and Win NT implementation of the function=20 ReleaseSemaphore(). For the record, I ran the same piece of=20 code on 98 and NT platforms, and the sem_getvalue() function does *not* work on NT (*as was suspected). Thanks again everyone Rob ------=_NextPart_000_0117_01C20809.08942690 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1815
I've found the problem. It looks like=20 the
pthreads-win32 coders already know about i= t,=20 as
it is commented in the set_getvalue.c sour= ce=20 file:
 

      /*=20 Note:
       *  The windows NT=20 documentation says that the increment must=20 be
       *  greater than zero, but i= t is=20 set to zero here. If this works,
       *&= nbsp;=20 the function will return true. If not, we can't do it this=20 way
       *  so flag it as not=20 implemented.
       */
 
It has to do with the differences between = the=20 Win98
and Win NT implementation of the function= =20
ReleaseSemaphore(). For the record, I ran = the same=20 piece of
code on 98 and NT platforms, and the sem_g= etvalue()=20 function
does *not* work on NT (*as was=20 suspected).
 
Thanks again everyone
Rob
------=_NextPart_000_0117_01C20809.08942690--