priorities with pthread?
I'm looking for a way to set the execution priority of a thread when using pthreads. The manual page says that the 'sched_priority' field of 'struct sched_param' only applies if you set the scheduling method to something other than default but doing so requires the process to be running root. There must be a way to spawn a new thread with a different priority than the parent thread, just as I can use 'nice' on the command line to set the priority of a process. I am using pthreads under linux.
Thanks in advance,
Viktor
|