summaryrefslogtreecommitdiff
path: root/src/modules/macosx
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-11-16 23:09:15 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-11-16 23:16:05 +0530
commite5953fb0ddf8c4a84c815f72755261e7dadbf00e (patch)
tree1abc72cd4175a895c2e0f3f575d119d8c209ef26 /src/modules/macosx
parent29f064aa3d3a83e275361aad3f9e7efdc84b8ad0 (diff)
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.
Diffstat (limited to 'src/modules/macosx')
-rw-r--r--src/modules/macosx/module-coreaudio-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
index 6d36a6aa1..ea88ebdfd 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
@@ -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);
}