public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
@ 2007-01-04  6:20 Iain Buchanan
  2007-01-04  6:42 ` Karl Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Iain Buchanan @ 2007-01-04  6:20 UTC (permalink / raw
  To: gentoo-user

Hi all,

I was just trying to compile one of my programs that includes
linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
isn't there anymore!

I've just upgraded linux-headers to 2.6.19 - is this the problem?  I
can't find a replacement for PID_MAX_DEFAULT anywhere in the header
files - has the name changed?

google was also unhelpful AFAICT.  I'd appreciate help!

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Nothing cures insomnia like the realization that it's time to get up.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
  2007-01-04  6:20 [gentoo-user] [OT] where is PID_MAX_DEFAULT ? Iain Buchanan
@ 2007-01-04  6:42 ` Karl Chen
  2007-01-04  6:48 ` Daniel Iliev
  2007-01-04 15:48 ` [gentoo-user] [OT] " Richard Fish
  2 siblings, 0 replies; 7+ messages in thread
From: Karl Chen @ 2007-01-04  6:42 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

I could find thread.h file there!
Maybe your tar ball of kernel has been damaged!
you could download it again and have a try !


On 1/4/07, Iain Buchanan <iaindb@netspace.net.au> wrote:
>
> Hi all,
>
> I was just trying to compile one of my programs that includes
> linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
> isn't there anymore!
>
> I've just upgraded linux-headers to 2.6.19 - is this the problem?  I
> can't find a replacement for PID_MAX_DEFAULT anywhere in the header
> files - has the name changed?
>
> google was also unhelpful AFAICT.  I'd appreciate help!
>
> thanks,
> --
> Iain Buchanan <iaindb at netspace dot net dot au>
>
> Nothing cures insomnia like the realization that it's time to get up.
>
> --
> gentoo-user@gentoo.org mailing list
>
>

[-- Attachment #2: Type: text/html, Size: 1204 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
  2007-01-04  6:20 [gentoo-user] [OT] where is PID_MAX_DEFAULT ? Iain Buchanan
  2007-01-04  6:42 ` Karl Chen
@ 2007-01-04  6:48 ` Daniel Iliev
  2007-01-04  7:05   ` Iain Buchanan
  2007-01-04 15:48 ` [gentoo-user] [OT] " Richard Fish
  2 siblings, 1 reply; 7+ messages in thread
From: Daniel Iliev @ 2007-01-04  6:48 UTC (permalink / raw
  To: gentoo-user

Iain Buchanan wrote:
> Hi all,
>
> I was just trying to compile one of my programs that includes
> linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
> isn't there anymore!
>
> I've just upgraded linux-headers to 2.6.19 - is this the problem?  I
> can't find a replacement for PID_MAX_DEFAULT anywhere in the header
> files - has the name changed?
>
> google was also unhelpful AFAICT.  I'd appreciate help!
>
> thanks,
>   



grep -n PID_MAX_DEFAULT /usr/include/linux/threads.h
28:#define PID_MAX_DEFAULT 0x8000
33:#define PID_MAX_LIMIT (sizeof(long) > 4 ? 4*1024*1024 : PID_MAX_DEFAULT)

It comes with "sys-kernel/linux-headers". Since it s a system package
you should already have it. There is also another version of "threads.h"
which comes with the kernel source:
/usr/src/linux/include/linux/threads.h, but AFAIK it is recommended to
use the first one.

-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
  2007-01-04  6:48 ` Daniel Iliev
@ 2007-01-04  7:05   ` Iain Buchanan
  2007-01-04 10:07     ` Daniel Iliev
  0 siblings, 1 reply; 7+ messages in thread
From: Iain Buchanan @ 2007-01-04  7:05 UTC (permalink / raw
  To: gentoo-user

On Thu, 2007-01-04 at 08:48 +0200, Daniel Iliev wrote:
> Iain Buchanan wrote:
> > Hi all,
> >
> > I was just trying to compile one of my programs that includes
> > linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
> > isn't there anymore!

[snip]

> grep -n PID_MAX_DEFAULT /usr/include/linux/threads.h
> 28:#define PID_MAX_DEFAULT 0x8000
> 33:#define PID_MAX_LIMIT (sizeof(long) > 4 ? 4*1024*1024 : PID_MAX_DEFAULT)

$ ls /usr/include/linux/threads.h
ls: cannot access /usr/include/linux/threads.h: No such file or
directory

$ slocate threads.h
/usr/include/X11/Xthreads.h
/usr/include/libxml2/libxml/threads.h
/usr/include/dbus-1.0/dbus/dbus-threads.h
/usr/include/stlport/stl/_threads.h
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/bits/stl_threads.h
/usr/lib/klibc/include/linux/threads.h
/usr/share/doc/libvorbis-1.1.2/txt/doc/vorbisfile/threads.html
/usr/src/linux-2.6.18-suspend2/include/linux/threads.h
/usr/src/linux-2.6.19-suspend2-r1/include/linux/threads.h

but I don't want to -I any of those!

> It comes with "sys-kernel/linux-headers".

$ equery l linux-headers
[ Searching for package 'linux-headers' in all categories among: ]
 * installed packages
[I--] [ ~] sys-kernel/linux-headers-2.6.19 (0)

what version do you have?

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

The main problem I have with cats is, they're not dogs.
		-- Kevin Cowherd

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
  2007-01-04  7:05   ` Iain Buchanan
@ 2007-01-04 10:07     ` Daniel Iliev
  2007-01-04 10:35       ` [gentoo-user] [OT][TYPO] " Daniel Iliev
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Iliev @ 2007-01-04 10:07 UTC (permalink / raw
  To: gentoo-user

Iain Buchanan wrote:
> --snip--
>
> $ slocate threads.h
> /usr/include/X11/Xthreads.h
> /usr/include/libxml2/libxml/threads.h
> /usr/include/dbus-1.0/dbus/dbus-threads.h
> /usr/include/stlport/stl/_threads.h
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/bits/stl_threads.h
> /usr/lib/klibc/include/linux/threads.h
> /usr/share/doc/libvorbis-1.1.2/txt/doc/vorbisfile/threads.html
> /usr/src/linux-2.6.18-suspend2/include/linux/threads.h
> /usr/src/linux-2.6.19-suspend2-r1/include/linux/threads.h
>
> but I don't want to -I any of those!
>
>   
My mistake - I should paste the whole output but only:

"/usr/include/linux/threads.h" and "/usr/src/linux-2.6.18-suspend2/include/linux/threads.h"

> what version do you have?
> thanks,
>   

 "sys-kernel/linux-headers-2.6.11-r2" on stable "amd64"


-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] [OT][TYPO] where is PID_MAX_DEFAULT ?
  2007-01-04 10:07     ` Daniel Iliev
@ 2007-01-04 10:35       ` Daniel Iliev
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Iliev @ 2007-01-04 10:35 UTC (permalink / raw
  To: gentoo-user

This message is just to correct a typo in my previous mail in the same
thread.

Please, read "My mistake - I should *NOT* have pasted the whole output
but only:" instead of "My mistake - I should paste the whole output but
only:"


I'm sorry about this.

-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
  2007-01-04  6:20 [gentoo-user] [OT] where is PID_MAX_DEFAULT ? Iain Buchanan
  2007-01-04  6:42 ` Karl Chen
  2007-01-04  6:48 ` Daniel Iliev
@ 2007-01-04 15:48 ` Richard Fish
  2 siblings, 0 replies; 7+ messages in thread
From: Richard Fish @ 2007-01-04 15:48 UTC (permalink / raw
  To: gentoo-user

On 1/3/07, Iain Buchanan <iaindb@netspace.net.au> wrote:
> Hi all,
>
> I was just trying to compile one of my programs that includes
> linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
> isn't there anymore!

Hmm, on linux the maximum PID can be changed dynamically at run time.
Wouldn't it be better to change this to read /proc/sys/kernel/pid_max?

> I've just upgraded linux-headers to 2.6.19 - is this the problem?

It seems so.  From kernel-2.eclass:

        # 2.6.18 introduces headers_install which means we dont need any
        # of this crap anymore :D
        if kernel_is ge 2 6 18 ; then
                env_setup_xmakeopts
                emake headers_install
INSTALL_HDR_PATH="${D}"/${ddir}/.. ${xmakeopts} || die

In other words, for versions previous to 2.6.18, (almost) all headers
in the tarball were installed.  For 2.6.18 and later, the makefile in
the tarball defines what gets installed.

If you truly need this header, make a private copy for your source
directory, or just define PID_MAX_DEFAULT yourself.  But as I
mentioned above, it can be changed at run-time, so relying on this to
be constant could be dangerous.

-Richard
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-04 15:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-04  6:20 [gentoo-user] [OT] where is PID_MAX_DEFAULT ? Iain Buchanan
2007-01-04  6:42 ` Karl Chen
2007-01-04  6:48 ` Daniel Iliev
2007-01-04  7:05   ` Iain Buchanan
2007-01-04 10:07     ` Daniel Iliev
2007-01-04 10:35       ` [gentoo-user] [OT][TYPO] " Daniel Iliev
2007-01-04 15:48 ` [gentoo-user] [OT] " Richard Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox