delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/25/23:01:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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" <arashp AT hotmail DOT com>
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
Message-ID: <BAY9-F5FQG101s7hpJm0000de08@hotmail.com>
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 <<EOF && \
>gcc -o pthread_mutexattr.exe pthread_mutexattr.c && \
>./pthread_mutexattr
>#include <pthread.h>
>#include <stdlib.h>

>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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019