Problem: A pthreaded programme is running the threads
sequentially not concurrently.
I'm running code like the following on Solaris 2.6
(The code runs correctly and multithreads on Digital Unix 4.0d
and Linux on both SMP and UP machines.) It does *NOT*
run concurrent threads on Solaris 2.6.
pthread_attr_setinheritsched(...) /* set to EXPLICIT */
pthread_attr_setschedpolicy(...) /* set to SCHED_OTHER */
Each thread creates a file and does work so that I can tell
if the threads are running concurrently or sequentially. But
the threads are not running concurrently. Instead the first
thread completes before the second starts. Is there something I should
check?? Machine is Ultra 450 with two CPUs. BTW why does libc.so
have pthread_ symbols - doesn't this mean that -lpthread is unnecessary?
It doesn't seem to make a difference if I use -lpthread or not
on the compilation.
Tel: +65 874 3343 | Department of Mathematics
Fax: +65 779 5452 | 10 Kent Ridge Crescent 119260