diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2012-11-16 23:09:15 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2012-11-16 23:16:05 +0530 |
commit | e5953fb0ddf8c4a84c815f72755261e7dadbf00e (patch) | |
tree | 1abc72cd4175a895c2e0f3f575d119d8c209ef26 /src/modules/xen/module-xenpv-sink.c | |
parent | 29f064aa3d3a83e275361aad3f9e7efdc84b8ad0 (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/xen/module-xenpv-sink.c')
-rw-r--r-- | src/modules/xen/module-xenpv-sink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/xen/module-xenpv-sink.c b/src/modules/xen/module-xenpv-sink.c index a5756e545..6f82ff41d 100644 --- a/src/modules/xen/module-xenpv-sink.c +++ b/src/modules/xen/module-xenpv-sink.c @@ -338,7 +338,7 @@ static void thread_func(void *userdata) { pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL); - if (u->sink->thread_info.rewind_requested) + if (PA_UNLIKELY(u->sink->thread_info.rewind_requested)) pa_sink_process_rewind(u->sink, 0); /* Render some data and write it to the fifo */ |