[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#324338: marked as done (pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE not available?)



Your message dated Tue, 23 Aug 2005 11:35:09 +0900
with message-id <81y86twfc2.wl%gotom@debian.or.jp>
and subject line Bug#324338: pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE not available?
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 21 Aug 2005 15:45:36 +0000
>From mista.tapas@gmx.net Sun Aug 21 08:45:36 2005
Return-path: <mista.tapas@gmx.net>
Received: from pop.gmx.de (mail.gmx.net) [213.165.64.20] 
	by spohr.debian.org with smtp (Exim 3.36 1 (Debian))
	id 1E6s0t-0006E1-00; Sun, 21 Aug 2005 08:45:35 -0700
Received: (qmail invoked by alias); 21 Aug 2005 15:45:04 -0000
Received: from dsl-084-060-034-121.arcor-ip.net (EHLO mango.fruits.de) [84.60.34.121]
  by mail.gmx.net (mp024) with SMTP; 21 Aug 2005 17:45:04 +0200
X-Authenticated: #4399952
Date: Sun, 21 Aug 2005 17:45:04 +0200
From: Florian Schmidt <mista.tapas@gmx.net>
To: submit@bugs.debian.org
Subject: pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE not available?
Message-ID: <20050821174504.35a4ecc7@mango.fruits.de>
X-Mailer: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: libc6-dev
Version: 2.3.5-4

Hi,

compiling this simple (non functional) test program

#include <pthread.h>

int main() {
        pthread_mutexattr_t attr;
        pthread_mutexattr_settype(&attr,0);
}


generates this warning:

~$ gcc foo.c -lpthread -Wall
foo.c: In function 'main':
foo.c:4: warning: implicit declaration of function 'pthread_mutexattr_settype'
foo.c:5: warning: control reaches end of non-void function

but the linking "works" and the symbol shows up as:

         U pthread_mutexattr_settype@@GLIBC_2.1

in nm a.out output. i'm not proficient enough to judge what exactly this
means :)

But this code

#include <pthread.h>

int main() {
        pthread_mutexattr_t attr;
        phread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
}

gives me:

~$ gcc foo.c -lpthread -Wall
foo.c: In function 'main':
foo.c:5: warning: implicit declaration of function 'phread_mutexattr_settype'
foo.c:5: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
foo.c:5: error: (Each undeclared identifier is reported only once
foo.c:5: error: for each function it appears in.)
foo.c:6: warning: control reaches end of non-void function

So something is broken, no?

Regards,
Florian Schmidt

P.S.:

~$ uname -a
Linux mango.fruits.de 2.6.13-rc4-RT-V0.7.52-10 #1 Wed Aug 3 19:55:31 CEST 2005 i686 GNU/Linux

~$ /lib/libc-2.3.5.so 
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.2 20050725 (prerelease) (Debian 4.0.1-3).
Compiled on a Linux 2.6.13 system on 2005-08-19.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - what's up with that?
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

~$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.5
^^^^^^^^^^ - and with this?

-- 
Palimm Palimm!
http://tapas.affenbande.org

---------------------------------------
Received: (at 324338-done) by bugs.debian.org; 23 Aug 2005 02:35:10 +0000
>From gotom@debian.or.jp Mon Aug 22 19:35:10 2005
Return-path: <gotom@debian.or.jp>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1E7Od4-0001F9-00; Mon, 22 Aug 2005 19:35:10 -0700
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
	by webmasters.gr.jp (Postfix) with ESMTP id 92472DEB3E;
	Tue, 23 Aug 2005 11:35:09 +0900 (JST)
Date: Tue, 23 Aug 2005 11:35:09 +0900
Message-ID: <81y86twfc2.wl%gotom@debian.or.jp>
From: GOTO Masanori <gotom@debian.or.jp>
To: Florian Schmidt <mista.tapas@gmx.net>,
	324338-done@bugs.debian.org
Subject: Re: Bug#324338: pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE not available?
In-Reply-To: <20050821174504.35a4ecc7@mango.fruits.de>
References: <20050821174504.35a4ecc7@mango.fruits.de>
User-Agent: Wanderlust/2.11.30 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 324338-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

At Sun, 21 Aug 2005 17:45:04 +0200,
Florian Schmidt wrote:
> #include <pthread.h>
> 
> int main() {
>         pthread_mutexattr_t attr;
>         phread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
> }
> 
> gives me:
> 
> ~$ gcc foo.c -lpthread -Wall
> foo.c: In function 'main':
> foo.c:5: warning: implicit declaration of function 'phread_mutexattr_settype'
> foo.c:5: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
> foo.c:5: error: (Each undeclared identifier is reported only once
> foo.c:5: error: for each function it appears in.)
> foo.c:6: warning: control reaches end of non-void function

Please use -D_XOPEN_SOURCE=500 or -D_GNU_SOURCE for your compilation
option.  They're not exported without such options.
/usr/include/pthread.h and info libc tell you about the meaning of
them.

Regards,
-- gotom



Reply to: