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

Building a nptl app



I am affraid I am having quite a bit of trouble building a NPTL capable app on RH9. attr_setstacksize seems to have no effect except when I link against the statics from the nptl-devel rpm. I am using a test jig someone distributed here to give an example.

bash-2.05b$ gcc -g -I/usr/include/nptl -L/usr/lib/nptl -lpthread thr.c -o max_threads

bash-2.05b$ ./max_threads 20000
Creating 20000 threads...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 ...
30 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 pthread_create: Resource temporarily unavailable



bash-2.05b$ gcc -g -I/usr/include/nptl -L/usr/lib/nptl thr.c /usr/lib/nptl/libc.a /usr/lib/nptl/libpthread.a -o max_threads


bash-2.05b$ ./max_threads 20000
Creating 20000 threads...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 ...
985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000



--


scp aron rubinium org:/dev/brain | grep ^work:

Aron Rubin                       Member, Engineering Staff
Lockheed Martin                  E-Mail: arubin atl lmco com
Advanced Technology Laboratories Phone:  856.338.4270
1 Federal St A&E 2W              Fax:    856.338.4121
Camden NJ USA 08103              Web:    http://www.atl.lmco.com





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