With Linux kernel 2.6
nice() called inside a pthread
affects only the calling thread
or all threads of the process??
(I guess in POSIX it affects the process, but Linux is not fully POSIX compliant cause threads are actually processes for the kernel scheduler)
In case it affects all process's threads, is there a call something like pthread_nice() to affect one thread only?
Please do not answer set_sched_param() cause that will not work for SCHED_OTHER policy as stated here
"pthread_setschedparam sets the scheduling parameters for the thread target_thread as indicated by policy and param. policy can be either SCHED_OTHER (regular, non-realtime scheduling), SCHED_RR (realtime, round-robin) or SCHED_FIFO (realtime, first-in first-out). param specifies the scheduling priority for the two realtime policies. See sched_setpolicy(2) for more information on scheduling policies. "
at http://www.linuxmanpages.com/man3/pt...param.3thr.php