7

pthread_cond_wait() CPU usage

view full story
linux-howto

http://ubuntuforums.org – It looks like each wait using this method consumes like 0.5-0.7% of CPU. To me it's a lot of CPU, when waiting in like 8 threads (doing nothing) the app uses like 4-5% of CPU! Can I do anything about it? See this youtube video (at 1080p), process name "ufbio". The relevant waiting code for each thread's cond_wait: Code: while(hints.bits & UFB_BIT_PAUSED) { L;     status = pthread_cond_wait(&hints.cond, &hints.mutex);//HERE each thread waits L;     if(status != 0) {         ufbErr(status);     }     if(hint (Hardware)