modules: Micro-optimisation for rewind_requested paths

Since some devices can be chatty with regards to how often they return
from poll(), this adds a PA_UNLIKELY() to all the the rewind_requested
checks in our sink modules to make the general case (no rewind was
requested) the fast path.
This commit is contained in:
Arun Raghavan 2012-11-16 23:09:15 +05:30
parent 29f064aa3d
commit e5953fb0dd
12 changed files with 12 additions and 12 deletions

View file

@ -665,7 +665,7 @@ static void thread_func(void *userdata) {
int ret;
PA_LLIST_FOREACH(ca_sink, u->sinks) {
if (ca_sink->pa_sink->thread_info.rewind_requested)
if (PA_UNLIKELY(ca_sink->pa_sink->thread_info.rewind_requested))
pa_sink_process_rewind(ca_sink->pa_sink, 0);
}