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

Re: PTHREAD_THREADS_MAX missing?



On Wed, Apr 02, 2003 at 10:25:54AM -0800, Dan Kegel wrote:
> Christoph Hellwig wrote:
> > On Wed, Apr 02, 2003 at 10:36:03AM -0600, Steven Munroe wrote:
> > 
> >>Has anyone run LTP against nptl recently?
> >>
> >>The ltp-20030324 version compile of trace_sched.c fails because
> >>PTHREAD_THREADS_MAX is not defined. Linuxthreads defines this in
> >>/sysdeps/unix/sysv/linux/bits/local_lim.h
> >>
> >>Should nptl define this (or similar) symbol? Or should this sort of thing be
> >>defined only in kernel headers (include/linux/threads.h)?
> > 
> > 
> > nptl has no hardcoded thread limits, see tst-sysconf.c.  The kernel
> > doesn't have a hardcoded number of threads (well, except PID_MAX)
> > aswell.
> 
> Furthermore, Posix does not require PTHREAD_THREADS_MAX be defined; see
> http://www.opengroup.org/onlinepubs/007904975/basedefs/pthread.h.html

Well, better URL would be
http://www.opengroup.org/onlinepubs/007904975/basedefs/limits.h.html

"A definition of one of the symbolic names in the following list shall be
omitted from <limits.h> on specific implementations where the corresponding
value is equal to or greater than the stated minimum, but is unspecified.

This indetermination might depend on the amount of available memory space
on a specific instance of a specific implementation. The actual value
supported by a specific instance shall be provided by the sysconf()
function."

> Looks like LTP needs to change trace_sched.c to be more posix-compliant.

Sure.

	Jakub





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