summaryrefslogtreecommitdiff
path: root/src/modules/module-solaris.c
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/module-solaris.c
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/module-solaris.c')
-rw-r--r--src/modules/module-solaris.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index aaf7189fd..753c1a1fd 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -628,7 +628,7 @@ static void thread_func(void *userdata) {
for (;;) {
/* Render some data and write it to the dsp */
- if (u->sink->thread_info.rewind_requested)
+ if (PA_UNLIKELY(u->sink->thread_info.rewind_requested))
process_rewind(u);
if (u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state)) {