1 |
On Sat, Oct 13, 2012 at 12:10 PM, Mark Knecht <markknecht@×××××.com> wrote: |
2 |
> On Sat, Oct 13, 2012 at 9:15 AM, Canek Peláez Valdés <caneko@×××××.com> wrote: |
3 |
> <SNIP> |
4 |
>> |
5 |
>> We can only know seeing the code. Timur, this is the little test I |
6 |
>> made which creates 5 threads and runs them for 1 minute. In my case, |
7 |
>> `ps x` shows only 1 PID, care to give it a try? |
8 |
>> |
9 |
>> ---------------------- |
10 |
>> #include <pthread.h> <<====== |
11 |
>> #include <unistd.h> |
12 |
>> #include <stdlib.h> |
13 |
>> #include <stdio.h> |
14 |
> |
15 |
> Thanks for the test case. Like you I see only one thread. However the |
16 |
> test case wouldn't compile for me without the -pthread option so it |
17 |
> makes me wonder what happens to a program like I had pointed to |
18 |
> yesterday that uses the old style threading that did create lots of |
19 |
> process ids? Possibly an nptl system would still generate lots of ids |
20 |
> for that program and that's what he's seeing? |
21 |
> |
22 |
> Just curious. I don't program but I'm always sort of interested. |
23 |
|
24 |
You got your answer. NTPL stands for Native POSIX Thread *Library*. As |
25 |
it name says, it is a library (with support in the kernel and in |
26 |
glibc). If you don't use the library (-lpthread), you cannot make use |
27 |
of its advantages. |
28 |
|
29 |
What "old style threading" did you use for your test case? |
30 |
|
31 |
Regards. |
32 |
-- |
33 |
Canek Peláez Valdés |
34 |
Posgrado en Ciencia e Ingeniería de la Computación |
35 |
Universidad Nacional Autónoma de México |