Re: -lthr vs. -pthread

2004-06-20 Thread Garance A Drosihn
At 4:14 AM +0200 6/20/04, Cyrille Lefevre wrote: is it normal that the selected process is the last forked thread and not the thread owner (father) ? I committed the changes, so people can try this if they want. Example: (48) ps -HO lwp,nlwp PIDLWP NLWP TT STAT TIME COMMAND 1870

Re: -lthr vs. -pthread

2004-06-20 Thread Julian Elischer
this is a question for marcel, but basically this may change. In current code the thread_id of the first thread is set to be equal to the PID. Marcel and I have discussed reworking the thread_id code and in the new code this will possibly not be true. Under KSE teh original thread has probably

Re: -lthr vs. -pthread

2004-06-20 Thread Marcel Moolenaar
On Sun, Jun 20, 2004 at 05:07:56PM -0700, Julian Elischer wrote: this is a question for marcel, but basically this may change. In current code the thread_id of the first thread is set to be equal to the PID. Marcel and I have discussed reworking the thread_id code and in the new code this will

-lthr vs. -pthread

2004-06-19 Thread Cyrille Lefevre
Hi, I'm currently working on enhancements to ps w/ Garance A Drosehn. I've just added some thread related stuffs and to see them, I'm using the following program : #define _REENTRANT #include pthread.h #define NUM_THREADS 5 #define SLEEP_TIME 10 void *sleeping(void *); pthread_t

Re: -lthr vs. -pthread

2004-06-19 Thread David Xu
libpthread default is M:N threading model, kernel thread entity is allocated on demand, things like sleep() only block thread in userland, no kernel thread will be allocated, so in your example, you won't see 5 kernel threads, only two threads are showed here, the extra thread is a signal