summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/rtpoll.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-11 13:15:39 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-11 13:15:39 +0000
commit391d09cd6e8d47ad8255736be5cb512b04843ed1 (patch)
treed5f66e0e8476ed5d3f21791c80a4a8fadf7bdef6 /src/pulsecore/rtpoll.c
parent597a1c4e82f2bb84e983d0cbb9be7e79c5607c00 (diff)
add 'wait' parameter to pa_rtpoll_run(), if zero pa_rtpoll_runn will only update the struct pollfd but not wait for an event
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1803 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/rtpoll.c')
-rw-r--r--src/pulsecore/rtpoll.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c
index e43ec610..be1c83c0 100644
--- a/src/pulsecore/rtpoll.c
+++ b/src/pulsecore/rtpoll.c
@@ -257,7 +257,7 @@ void pa_rtpoll_free(pa_rtpoll *p) {
pa_xfree(p);
}
-int pa_rtpoll_run(pa_rtpoll *p) {
+int pa_rtpoll_run(pa_rtpoll *p, int wait) {
pa_rtpoll_item *i;
int r = 0;
int no_events = 0;
@@ -301,7 +301,10 @@ int pa_rtpoll_run(pa_rtpoll *p) {
rtpoll_rebuild(p);
/* Calculate timeout */
- if (p->timer_enabled) {
+ if (!wait) {
+ timeout.tv_sec = 0;
+ timeout.tv_nsec = 0;
+ } else if (p->timer_enabled) {
struct timespec now;
pa_rtclock_get(&now);