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

Re: [LTP] Re: PTHREAD_THREADS_MAX missing?



Although the LTP has no goal of becoming "POSIX compliant"....mostly b/c
Linux itself is not....I agree that any test for POSIX threads should be.
I added the following code, in hopes that it will be more "generic":

#ifdef PTHREAD_THREADS_MAX
#define PIDS PTHREAD_THREADS_MAX /* maximum thread allowed.
*/
#elif defined(PID_MAX_DEFAULT)
#define PIDS PID_MAX_DEFAULT     /* maximum pids allowed.
*/
#elif defined(PID_MAX)
#define PIDS PID_MAX             /* alternative way maximum pids may be
defined */
#endif

- Robbie

Robert V. Williamson <robbiew us ibm com>
Linux Test Project
IBM Linux Technology Center
Phone: (512) 838-9295   T/L: 678-9295
Fax: (512) 838-4603
Web: http://ltp.sourceforge.net
IRC: #ltp on freenode.irc.net
====================
"Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former." -Albert Einstein


                                                                                                                                              
                      Dan Kegel                                                                                                               
                      <dank kegel com>                 To:       Christoph Hellwig <hch lst de>                                               
                      Sent by:                         cc:       sjmunroe vnet ibm com, phil-list redhat com,                                 
                      ltp-list-admin lists sour         "'ltp-list lists sourceforge net'" <ltp-list lists sourceforge net>                   
                      ceforge.net                      Subject:  [LTP] Re: PTHREAD_THREADS_MAX missing?                                       
                                                                                                                                              
                                                                                                                                              
                      04/02/2003 12:25 PM                                                                                                     
                                                                                                                                              




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

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

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Ltp-list mailing list
Ltp-list lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/ltp-list








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