From 32e2cd6d3216f780c4cffed0f8eb3c30f2c8d732 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jun 2009 21:00:06 +0200 Subject: core: get rid of rt sig/timer handling since modern Linux' ppooll() is finally fixed for granularity --- src/Makefile.am | 1 - src/daemon/main.c | 6 - src/modules/alsa/alsa-sink.c | 1 - src/modules/alsa/alsa-source.c | 1 - src/modules/bluetooth/module-bluetooth-device.c | 1 - src/modules/jack/module-jack-sink.c | 1 - src/modules/jack/module-jack-source.c | 1 - src/modules/module-combine.c | 1 - src/modules/module-esound-sink.c | 1 - src/modules/module-null-sink.c | 1 - src/modules/module-pipe-sink.c | 1 - src/modules/module-pipe-source.c | 1 - src/modules/module-sine-source.c | 1 - src/modules/module-tunnel.c | 1 - src/modules/oss/module-oss.c | 1 - src/modules/raop/module-raop-sink.c | 1 - src/pulsecore/rtpoll.c | 176 +----------------------- src/pulsecore/rtpoll.h | 3 - src/pulsecore/rtsig.c | 131 ------------------ src/pulsecore/rtsig.h | 39 ------ src/tests/rtpoll-test.c | 6 - 21 files changed, 4 insertions(+), 372 deletions(-) delete mode 100644 src/pulsecore/rtsig.c delete mode 100644 src/pulsecore/rtsig.h diff --git a/src/Makefile.am b/src/Makefile.am index 5efe1ac8..d5fbf275 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -811,7 +811,6 @@ libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES = \ pulsecore/play-memchunk.c pulsecore/play-memchunk.h \ pulsecore/resampler.c pulsecore/resampler.h \ pulsecore/rtpoll.c pulsecore/rtpoll.h \ - pulsecore/rtsig.c pulsecore/rtsig.h \ pulsecore/sample-util.c pulsecore/sample-util.h \ pulsecore/sconv-s16be.c pulsecore/sconv-s16be.h \ pulsecore/sconv-s16le.c pulsecore/sconv-s16le.h \ diff --git a/src/daemon/main.c b/src/daemon/main.c index 4b2a1f8b..2ecd6c2f 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -84,7 +84,6 @@ #include #include #include -#include #include #include #include @@ -797,11 +796,6 @@ int main(int argc, char *argv[]) { else pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!")); -#ifdef SIGRTMIN - /* Valgrind uses SIGRTMAX. To easy debugging we don't use it here */ - pa_rtsig_configure(SIGRTMIN, SIGRTMAX-1); -#endif - if (conf->lock_memory) { #ifdef HAVE_SYS_MMAN_H if (mlockall(MCL_FUTURE) < 0) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 281371f7..c39a898f 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -1212,7 +1212,6 @@ static void thread_func(void *userdata) { pa_make_realtime(u->core->realtime_priority); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index 4be27eb0..755ceae2 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -1094,7 +1094,6 @@ static void thread_func(void *userdata) { pa_make_realtime(u->core->realtime_priority); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 6bcd0b80..0f1e78f2 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1265,7 +1265,6 @@ static void thread_func(void *userdata) { goto fail; pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { struct pollfd *pollfd; diff --git a/src/modules/jack/module-jack-sink.c b/src/modules/jack/module-jack-sink.c index 290038e7..fc976fa7 100644 --- a/src/modules/jack/module-jack-sink.c +++ b/src/modules/jack/module-jack-sink.c @@ -225,7 +225,6 @@ static void thread_func(void *userdata) { pa_make_realtime(u->core->realtime_priority); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/jack/module-jack-source.c b/src/modules/jack/module-jack-source.c index ef89a98e..a898e0e5 100644 --- a/src/modules/jack/module-jack-source.c +++ b/src/modules/jack/module-jack-source.c @@ -196,7 +196,6 @@ static void thread_func(void *userdata) { pa_make_realtime(u->core->realtime_priority); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c index 725faa0c..cd3118d7 100644 --- a/src/modules/module-combine.c +++ b/src/modules/module-combine.c @@ -280,7 +280,6 @@ static void thread_func(void *userdata) { pa_make_realtime(u->core->realtime_priority+1); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); u->thread_info.timestamp = pa_rtclock_usec(); u->thread_info.in_null_mode = FALSE; diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c index 8cb25c51..48a9c794 100644 --- a/src/modules/module-esound-sink.c +++ b/src/modules/module-esound-sink.c @@ -200,7 +200,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec()); diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c index 30a99ca7..c4753c9d 100644 --- a/src/modules/module-null-sink.c +++ b/src/modules/module-null-sink.c @@ -208,7 +208,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); u->timestamp = pa_rtclock_usec(); diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c index 5b0f6414..8a7dc846 100644 --- a/src/modules/module-pipe-sink.c +++ b/src/modules/module-pipe-sink.c @@ -170,7 +170,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { struct pollfd *pollfd; diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c index 61c9fc0e..e5609fb5 100644 --- a/src/modules/module-pipe-source.c +++ b/src/modules/module-pipe-source.c @@ -129,7 +129,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c index 14a04e47..8df4d9bb 100644 --- a/src/modules/module-sine-source.c +++ b/src/modules/module-sine-source.c @@ -166,7 +166,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); u->timestamp = pa_rtclock_usec(); diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c index c493d9bb..eaed5f9a 100644 --- a/src/modules/module-tunnel.c +++ b/src/modules/module-tunnel.c @@ -683,7 +683,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c index b1afcfd6..c44b882b 100644 --- a/src/modules/oss/module-oss.c +++ b/src/modules/oss/module-oss.c @@ -889,7 +889,6 @@ static void thread_func(void *userdata) { pa_make_realtime(u->core->realtime_priority); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); for (;;) { int ret; diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c index 54de42c2..cab3a82a 100644 --- a/src/modules/raop/module-raop-sink.c +++ b/src/modules/raop/module-raop-sink.c @@ -323,7 +323,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec()); diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c index aa8ca321..185b8211 100644 --- a/src/pulsecore/rtpoll.c +++ b/src/pulsecore/rtpoll.c @@ -30,10 +30,6 @@ #include #include -#ifdef __linux__ -#include -#endif - #ifdef HAVE_POLL_H #include #else @@ -47,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -66,20 +61,9 @@ struct pa_rtpoll { pa_bool_t scan_for_dead:1; pa_bool_t running:1; - pa_bool_t installed:1; pa_bool_t rebuild_needed:1; pa_bool_t quit:1; -#ifdef HAVE_PPOLL - pa_bool_t timer_armed:1; -#ifdef __linux__ - pa_bool_t dont_use_ppoll:1; -#endif - int rtsig; - sigset_t sigset_unblocked; - timer_t timer; -#endif - #ifdef DEBUG_TIMING pa_usec_t timestamp; pa_usec_t slept, awake; @@ -107,52 +91,20 @@ struct pa_rtpoll_item { PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree); -static void signal_handler_noop(int s) { /* write(2, "signal\n", 7); */ } - pa_rtpoll *pa_rtpoll_new(void) { pa_rtpoll *p; p = pa_xnew(pa_rtpoll, 1); -#ifdef HAVE_PPOLL - -#ifdef __linux__ - /* ppoll is broken on Linux < 2.6.16 */ - p->dont_use_ppoll = FALSE; - - { - struct utsname u; - unsigned major, minor, micro; - - pa_assert_se(uname(&u) == 0); - - if (sscanf(u.release, "%u.%u.%u", &major, &minor, µ) != 3 || - (major < 2) || - (major == 2 && minor < 6) || - (major == 2 && minor == 6 && micro < 16)) - - p->dont_use_ppoll = TRUE; - } - -#endif - - p->rtsig = -1; - sigemptyset(&p->sigset_unblocked); - p->timer = (timer_t) -1; - p->timer_armed = FALSE; - -#endif - p->n_pollfd_alloc = 32; p->pollfd = pa_xnew(struct pollfd, p->n_pollfd_alloc); p->pollfd2 = pa_xnew(struct pollfd, p->n_pollfd_alloc); p->n_pollfd_used = 0; - memset(&p->next_elapse, 0, sizeof(p->next_elapse)); + pa_zero(p->next_elapse); p->timer_enabled = FALSE; p->running = FALSE; - p->installed = FALSE; p->scan_for_dead = FALSE; p->rebuild_needed = FALSE; p->quit = FALSE; @@ -167,46 +119,6 @@ pa_rtpoll *pa_rtpoll_new(void) { return p; } -void pa_rtpoll_install(pa_rtpoll *p) { - pa_assert(p); - pa_assert(!p->installed); - - p->installed = TRUE; - -#ifdef HAVE_PPOLL -# ifdef __linux__ - if (p->dont_use_ppoll) - return; -# endif - - if ((p->rtsig = pa_rtsig_get_for_thread()) < 0) { - pa_log_warn("Failed to reserve POSIX realtime signal."); - return; - } - - pa_log_debug("Acquired POSIX realtime signal %s", pa_sig2str(p->rtsig)); - - { - sigset_t ss; - struct sigaction sa; - - pa_assert_se(sigemptyset(&ss) == 0); - pa_assert_se(sigaddset(&ss, p->rtsig) == 0); - pa_assert_se(pthread_sigmask(SIG_BLOCK, &ss, &p->sigset_unblocked) == 0); - pa_assert_se(sigdelset(&p->sigset_unblocked, p->rtsig) == 0); - - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = signal_handler_noop; - pa_assert_se(sigemptyset(&sa.sa_mask) == 0); - - pa_assert_se(sigaction(p->rtsig, &sa, NULL) == 0); - - /* We never reset the signal handler. Why should we? */ - } - -#endif -} - static void rtpoll_rebuild(pa_rtpoll *p) { struct pollfd *e, *t; @@ -250,7 +162,6 @@ static void rtpoll_rebuild(pa_rtpoll *p) { if (ra) p->pollfd2 = pa_xrealloc(p->pollfd2, p->n_pollfd_alloc * sizeof(struct pollfd)); - } static void rtpoll_item_destroy(pa_rtpoll_item *i) { @@ -279,11 +190,6 @@ void pa_rtpoll_free(pa_rtpoll *p) { pa_xfree(p->pollfd); pa_xfree(p->pollfd2); -#ifdef HAVE_PPOLL - if (p->timer != (timer_t) -1) - timer_delete(p->timer); -#endif - pa_xfree(p); } @@ -321,7 +227,6 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) { pa_assert(p); pa_assert(!p->running); - pa_assert(p->installed); p->running = TRUE; @@ -402,22 +307,15 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) { /* OK, now let's sleep */ #ifdef HAVE_PPOLL - -#ifdef __linux__ - if (!p->dont_use_ppoll) -#endif { struct timespec ts; ts.tv_sec = timeout.tv_sec; ts.tv_nsec = timeout.tv_usec * 1000; - r = ppoll(p->pollfd, p->n_pollfd_used, (!wait || p->quit || p->timer_enabled) ? &ts : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked); + r = ppoll(p->pollfd, p->n_pollfd_used, (!wait || p->quit || p->timer_enabled) ? &ts : NULL, NULL); } -#ifdef __linux__ - else -#endif - -#endif +#else r = poll(p->pollfd, p->n_pollfd_used, (!wait || p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1); +#endif #ifdef DEBUG_TIMING { @@ -472,73 +370,11 @@ finish: return r < 0 ? r : !p->quit; } -static void update_timer(pa_rtpoll *p) { - pa_assert(p); - -#ifdef HAVE_PPOLL - -#ifdef __linux__ - if (p->dont_use_ppoll) - return; -#endif - - if (p->timer == (timer_t) -1) { - struct sigevent se; - - memset(&se, 0, sizeof(se)); - se.sigev_notify = SIGEV_SIGNAL; - se.sigev_signo = p->rtsig; - - if (timer_create(CLOCK_MONOTONIC, &se, &p->timer) < 0) - if (timer_create(CLOCK_REALTIME, &se, &p->timer) < 0) { - pa_log_warn("Failed to allocate POSIX timer: %s", pa_cstrerror(errno)); - p->timer = (timer_t) -1; - } - } - - if (p->timer != (timer_t) -1) { - struct itimerspec its; - struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 }; - sigset_t ss; - - if (p->timer_armed) { - /* First disarm timer */ - memset(&its, 0, sizeof(its)); - pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0); - - /* Remove a signal that might be waiting in the signal q */ - pa_assert_se(sigemptyset(&ss) == 0); - pa_assert_se(sigaddset(&ss, p->rtsig) == 0); - sigtimedwait(&ss, NULL, &ts); - } - - /* And install the new timer */ - if (p->timer_enabled) { - memset(&its, 0, sizeof(its)); - - its.it_value.tv_sec = p->next_elapse.tv_sec; - its.it_value.tv_nsec = p->next_elapse.tv_usec*1000; - - /* Make sure that 0,0 is not understood as - * "disarming" */ - if (its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0) - its.it_value.tv_nsec = 1; - pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0); - } - - p->timer_armed = p->timer_enabled; - } - -#endif -} - void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, pa_usec_t usec) { pa_assert(p); pa_timeval_store(&p->next_elapse, usec); p->timer_enabled = TRUE; - - update_timer(p); } void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec) { @@ -550,8 +386,6 @@ void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec) { pa_rtclock_get(&p->next_elapse); pa_timeval_add(&p->next_elapse, usec); p->timer_enabled = TRUE; - - update_timer(p); } void pa_rtpoll_set_timer_disabled(pa_rtpoll *p) { @@ -559,8 +393,6 @@ void pa_rtpoll_set_timer_disabled(pa_rtpoll *p) { memset(&p->next_elapse, 0, sizeof(p->next_elapse)); p->timer_enabled = FALSE; - - update_timer(p); } pa_rtpoll_item *pa_rtpoll_item_new(pa_rtpoll *p, pa_rtpoll_priority_t prio, unsigned n_fds) { diff --git a/src/pulsecore/rtpoll.h b/src/pulsecore/rtpoll.h index 08776ef0..d2d69cad 100644 --- a/src/pulsecore/rtpoll.h +++ b/src/pulsecore/rtpoll.h @@ -62,9 +62,6 @@ typedef enum pa_rtpoll_priority { pa_rtpoll *pa_rtpoll_new(void); void pa_rtpoll_free(pa_rtpoll *p); -/* Install the rtpoll in the current thread */ -void pa_rtpoll_install(pa_rtpoll *p); - /* Sleep on the rtpoll until the time event, or any of the fd events * is triggered. If "wait" is 0 we don't sleep but only update the * struct pollfd. Returns negative on error, positive if the loop diff --git a/src/pulsecore/rtsig.c b/src/pulsecore/rtsig.c deleted file mode 100644 index 4cd6aa8f..00000000 --- a/src/pulsecore/rtsig.c +++ /dev/null @@ -1,131 +0,0 @@ -/*** - This file is part of PulseAudio. - - Copyright 2004-2006 Lennart Poettering - Copyright 2006 Pierre Ossman for Cendio AB - - PulseAudio is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - PulseAudio is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with PulseAudio; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include -#include - -#include "rtsig.h" - -#ifdef SIGRTMIN - -static void _free_rtsig(void *p) { - pa_rtsig_put(PA_PTR_TO_INT(p)); -} - -PA_STATIC_FLIST_DECLARE(rtsig_flist, pa_make_power_of_two((unsigned) (SIGRTMAX-SIGRTMIN+1)), NULL); -PA_STATIC_TLS_DECLARE(rtsig_tls, _free_rtsig); - -static pa_atomic_t rtsig_current = PA_ATOMIC_INIT(-1); - -static int rtsig_start = -1, rtsig_end = -1; - -int pa_rtsig_get(void) { - void *p; - int sig; - - if ((p = pa_flist_pop(PA_STATIC_FLIST_GET(rtsig_flist)))) - return PA_PTR_TO_INT(p); - - sig = pa_atomic_dec(&rtsig_current); - - pa_assert(sig <= SIGRTMAX); - pa_assert(sig <= rtsig_end); - - if (sig < rtsig_start) { - pa_atomic_inc(&rtsig_current); - return -1; - } - - return sig; -} - -int pa_rtsig_get_for_thread(void) { - int sig; - void *p; - - if ((p = PA_STATIC_TLS_GET(rtsig_tls))) - return PA_PTR_TO_INT(p); - - if ((sig = pa_rtsig_get()) < 0) - return -1; - - PA_STATIC_TLS_SET(rtsig_tls, PA_INT_TO_PTR(sig)); - return sig; -} - -void pa_rtsig_put(int sig) { - pa_assert(sig >= rtsig_start); - pa_assert(sig <= rtsig_end); - - pa_assert_se(pa_flist_push(PA_STATIC_FLIST_GET(rtsig_flist), PA_INT_TO_PTR(sig)) >= 0); -} - -void pa_rtsig_configure(int start, int end) { - int s; - sigset_t ss; - - pa_assert(pa_atomic_load(&rtsig_current) == -1); - - pa_assert(SIGRTMIN <= start); - pa_assert(start <= end); - pa_assert(end <= SIGRTMAX); - - rtsig_start = start; - rtsig_end = end; - - sigemptyset(&ss); - - for (s = rtsig_start; s <= rtsig_end; s++) - pa_assert_se(sigaddset(&ss, s) == 0); - - pa_assert(pthread_sigmask(SIG_BLOCK, &ss, NULL) == 0); - - /* We allocate starting from the end */ - pa_atomic_store(&rtsig_current, rtsig_end); -} - -#else /* SIGRTMIN */ - -int pa_rtsig_get(void) { - return -1; -} - -int pa_rtsig_get_for_thread(void) { - return -1; -} - -void pa_rtsig_put(int sig) { -} - -void pa_rtsig_configure(int start, int end) { -} - -#endif /* SIGRTMIN */ diff --git a/src/pulsecore/rtsig.h b/src/pulsecore/rtsig.h deleted file mode 100644 index e414122d..00000000 --- a/src/pulsecore/rtsig.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef foopulsertsighfoo -#define foopulsertsighfoo - -/*** - This file is part of PulseAudio. - - Copyright 2004-2006 Lennart Poettering - - PulseAudio is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - PulseAudio is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with PulseAudio; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. -***/ - -/* Return the next unused POSIX Realtime signals */ -int pa_rtsig_get(void); - -/* If not called before in the current thread, return the next unused - * rtsig, and install it in a TLS region and give it up automatically - * when the thread shuts down */ -int pa_rtsig_get_for_thread(void); - -/* Give an rtsig back. */ -void pa_rtsig_put(int sig); - -/* Block all RT signals */ -void pa_rtsig_configure(int start, int end); - -#endif diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c index 4ac96446..1706cdfa 100644 --- a/src/tests/rtpoll-test.c +++ b/src/tests/rtpoll-test.c @@ -26,7 +26,6 @@ #include #include -#include static int before(pa_rtpoll_item *i) { pa_log("before"); @@ -47,10 +46,6 @@ int main(int argc, char *argv[]) { pa_rtpoll_item *i, *w; struct pollfd *pollfd; -#ifdef SIGRTMIN - pa_rtsig_configure(SIGRTMIN+10, SIGRTMAX); -#endif - p = pa_rtpoll_new(); i = pa_rtpoll_item_new(p, PA_RTPOLL_EARLY, 1); @@ -64,7 +59,6 @@ int main(int argc, char *argv[]) { w = pa_rtpoll_item_new(p, PA_RTPOLL_NORMAL, 0); pa_rtpoll_item_set_before_callback(w, worker); - pa_rtpoll_install(p); pa_rtpoll_set_timer_relative(p, 10000000); /* 10 s */ pa_rtpoll_run(p, 1); -- cgit