pthread_create creating 2 threads on first call

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

 



Hello folks,

I have a simple demo program that call pthread_create
5 times with identical parameters.  On the FIRST call 
to pthread_create, two threads are created. One of these 
thread is what I am expecting.  On subsequent call to 
pthread_create, only one thread is created as expected.

Does anyone happen to know why on the FIRST call to
pthread_create, two threads are created?  What does the
extra one do?  Many thanks!

- Nguyen

ps: I am compiling with the -pthread switch.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux