Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [220.244.224.41] X-Originating-Email: [arashp AT hotmail DOT com] X-Sender: arashp AT hotmail DOT com From: "Arash Partow" To: cygwin AT cygwin DOT com Subject: Re: Problems with pthread mutexes Date: Sun, 26 Sep 2004 03:00:03 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 26 Sep 2004 03:01:02.0186 (UTC) FILETIME=[0E6ECCA0:01C4A375] X-IsSubscribed: yes Hi Brian, The result I get back is 16 which according to stderror is: "Mount device busy". The mutex is being created within a running thread. It is very strange that the same code compiles fine on other OS and that they don't give back an error. I'll try writing up a more simpler example that can be run, also I'm compiling with -O3,I'm not sure how cygwin's modes to gcc effect this level of optimization. Arash Partow __________________________________________________ Be one who knows what they don't know, Instead of being one who knows not what they don't know, Thinking they know everything about all things. http://www.partow.net >It must be something your code is doing wrong -- something not in the >above snippet. I think you'll find that if you can narrow it down to a >simple testcase that compiles and exhibits the error it will be much >easier to find out what's wrong. Your above code works fine for me: > >$ cat >pthread_mutexattr.c <gcc -o pthread_mutexattr.exe pthread_mutexattr.c && \ >./pthread_mutexattr >#include >#include >int main() { > int result; > pthread_mutexattr_t mutex_attr; > > if ((result = pthread_mutexattr_init(&mutex_attr)) != 0) > perror("pthread_mutexattr_init"); > else > printf("success"); >} >EOF >success > >Brian > >-- . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/