2006-08-20 17:46:17

by Irfan Habib

[permalink] [raw]
Subject: question on pthreads

Hi,

Where should I look for the code of the native Pthreads implemetation:

I've found this:
http://pauillac.inria.fr/~xleroy/linuxthreads/

Supposedly from the site,it has been superceeded by NPTL by Ulrich
Drepper, but I cant find the code for NPTL?


2006-08-20 19:37:57

by Nix

[permalink] [raw]
Subject: Re: question on pthreads

On 20 Aug 2006, Irfan Habib suggested tentatively:
> Hi,
>
> Where should I look for the code of the native Pthreads implemetation:
>
> I've found this:
> http://pauillac.inria.fr/~xleroy/linuxthreads/
>
> Supposedly from the site,it has been superceeded by NPTL by Ulrich
> Drepper, but I cant find the code for NPTL?

It is in glibc.

--
`We're sysadmins. We deal with the inconceivable so often I can clearly
see the need to define levels of inconceivability.' --- Rik Steenwinkel

2006-08-20 21:45:09

by Luka Marinko

[permalink] [raw]
Subject: Re: question on pthreads

On Sun, 20 Aug 2006 22:46:14 +0500, Irfan Habib wrote:

> Hi,
>
> Where should I look for the code of the native Pthreads implemetation:
>
> I've found this:
> http://pauillac.inria.fr/~xleroy/linuxthreads/
>
> Supposedly from the site,it has been superceeded by NPTL by Ulrich
> Drepper, but I cant find the code for NPTL?

pthreads (whitch is now NPTL), is part of glibc and can be found at
http://www.gnu.org/software/libc/

You can find nice manual here, and overview
http://www.gnu.org/software/libc/manual/html_mono/libc.html

Also keep in mind that soem distros, patch their glibs, so you might want
to get sources from there

have a nice day,
Luka Marinko

2006-08-20 22:21:19

by Lee Revell

[permalink] [raw]
Subject: Re: question on pthreads

On Sun, 2006-08-20 at 21:32 +0000, Luka Marinko wrote:
> You can find nice manual here, and overview
> http://www.gnu.org/software/libc/manual/html_mono/libc.html
>

Unfortunately the NPTL documentation is FAR from complete - there are no
man pages at all, and some featured are completely undocumented. For
example process-shared mutexes are supported, but the only way you'd
know is to look at the source. The only docs I could find on how to use
them were old Solaris man pages.

Lee

2006-08-21 10:45:35

by Mark Hounschell

[permalink] [raw]
Subject: Re: question on pthreads

Lee Revell wrote:
> On Sun, 2006-08-20 at 21:32 +0000, Luka Marinko wrote:
>> You can find nice manual here, and overview
>> http://www.gnu.org/software/libc/manual/html_mono/libc.html
>>
>
> Unfortunately the NPTL documentation is FAR from complete - there are no
> man pages at all, and some featured are completely undocumented. For
> example process-shared mutexes are supported, but the only way you'd
> know is to look at the source. The only docs I could find on how to use
> them were old Solaris man pages.
>
> Lee
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

glibc 2.4.31 has a man page for it.

PTHREAD_MUTEXATTR_GETPSHARED(P) POSIX
Programmer's Manual PTHREAD_MUTEXATTR_GETPSHARED(P)



NAME
pthread_mutexattr_getpshared, pthread_mutexattr_setpshared - get and set
the process-shared attribute

SYNOPSIS
#include <pthread.h>

int pthread_mutexattr_getpshared(const pthread_mutexattr_t *
restrict attr, int *restrict pshared);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
int pshared);

Mark

2006-08-29 00:21:59

by Nix

[permalink] [raw]
Subject: Re: question on pthreads

On 21 Aug 2006, Mark Hounschell said:
> glibc 2.4.31 has a man page for it.
>
> PTHREAD_MUTEXATTR_GETPSHARED(P) POSIX
> Programmer's Manual PTHREAD_MUTEXATTR_GETPSHARED(P)

That's not in glibc, that's in the POSIX part of the manpages
distribution.

--
`In typical emacs fashion, it is both absurdly ornate and
still not really what one wanted.' --- jdev

2006-08-29 11:51:16

by Mark Hounschell

[permalink] [raw]
Subject: Re: question on pthreads

Nix wrote:
> On 21 Aug 2006, Mark Hounschell said:
>> glibc 2.4.31 has a man page for it.
>>
>> PTHREAD_MUTEXATTR_GETPSHARED(P) POSIX
>> Programmer's Manual PTHREAD_MUTEXATTR_GETPSHARED(P)
>
> That's not in glibc, that's in the POSIX part of the manpages
> distribution.
>

True but non of my machines had that manpage until the support was in glibc.
Coincidence? Could be I guess...

Mark