RE: pthread_create creating 2 threads on first call

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

 



that should probably be the thread created by the kernel to deal all the
threads created by your program.
regards.

-----Original Message-----
From: Nguyen, NguyenX D [mailto:nguyenx.d.nguyen@intel.com]
Sent: Wednesday, November 20, 2002 9:53 PM
To: kernelnewbies@nl.linux.org
Subject: pthread_create creating 2 threads on first call


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/
--
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