1833592 Members
4066 Online
110061 Solutions
New Discussion

about pthread number

 
hunter tang
Occasional Contributor

about pthread number

Hi there,

Does anyone know that when create threads using pthread, why the number of thread is all the threads +2?

The platform here is rx5670 w/HPUX 11.22.
any comments will be appreciated.
hunter
2 REPLIES 2
Umapathy S
Honored Contributor

Re: about pthread number

Hunter,
Can you explain your question more clearly. Is pthread_create always return 2 for pthread_t. Or the number of threads created is 2.

-Umapathy
Arise Awake and Stop NOT till the goal is Reached!
hunter tang
Occasional Contributor

Re: about pthread number

thanks.
My problem is that when I create one thread, and in glance, I found 4 threads for this process.

I just found out the reason, it seems on HPUX 11.22, the thread scope is PROCESS by default, after I set the scope to SYSTEM, it was solved.

rgds
hunter