]> code.delx.au - pulseaudio/commitdiff
core: get rid of rt sig/timer handling since modern Linux' ppooll() is finally fixed...
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Jun 2009 19:00:06 +0000 (21:00 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jun 2009 19:00:06 +0000 (21:00 +0200)
21 files changed:
src/Makefile.am
src/daemon/main.c
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c
src/modules/bluetooth/module-bluetooth-device.c
src/modules/jack/module-jack-sink.c
src/modules/jack/module-jack-source.c
src/modules/module-combine.c
src/modules/module-esound-sink.c
src/modules/module-null-sink.c
src/modules/module-pipe-sink.c
src/modules/module-pipe-source.c
src/modules/module-sine-source.c
src/modules/module-tunnel.c
src/modules/oss/module-oss.c
src/modules/raop/module-raop-sink.c
src/pulsecore/rtpoll.c
src/pulsecore/rtpoll.h
src/pulsecore/rtsig.c [deleted file]
src/pulsecore/rtsig.h [deleted file]
src/tests/rtpoll-test.c

index 5efe1ac8e863ed311e7730a5de01a8cdebe39ab6..d5fbf275b59db51a7f3974aef7ea7a23af8acbf2 100644 (file)
@@ -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 \
index 4b2a1f8b2df6cd1fb14078d8cf044f3b9e93289f..2ecd6c2f4c08f13ec9f172f1119106e3ba1e9320 100644 (file)
@@ -84,7 +84,6 @@
 #include <pulsecore/pid.h>
 #include <pulsecore/namereg.h>
 #include <pulsecore/random.h>
-#include <pulsecore/rtsig.h>
 #include <pulsecore/rtclock.h>
 #include <pulsecore/macro.h>
 #include <pulsecore/mutex.h>
@@ -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)
index 281371f74daf7b785436a88cb8a6ee75704183b8..c39a898fa5763bfeb6d809e6717865ceff4d9a71 100644 (file)
@@ -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;
index 4be27eb0c7f3fdaa5aebf7dd3ea9a02895dc84e0..755ceae27319a1d187beb6b17bd26194d0239dc7 100644 (file)
@@ -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;
index 6bcd0b80962a3754238f4fc4ff30f033653c03d1..0f1e78f2d32dfb9a0ae39f37b66fb6f56bc22c9c 100644 (file)
@@ -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;
index 290038e72973d946926e81b28655431270175f21..fc976fa72a6d1def62e5e0817e1596df6e637895 100644 (file)
@@ -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;
index ef89a98e5633d3d3c1bf91527fbcc41e24bab484..a898e0e5ac8430df5d637fb475981caea41c3eb0 100644 (file)
@@ -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;
index 725faa0c03e15b85aa93ef8b44c4cc7d4f04fdf5..cd3118d79cb072f8f1a1edb81ac86d941f492ff0 100644 (file)
@@ -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;
index 8cb25c51d7f50cba26a4a20c16eedb90e2c6844d..48a9c7947766d4d332db09966720d97e3d0bbe56 100644 (file)
@@ -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());
 
index 30a99ca7fbbca12cac87ae7ca63f6276785f4ce4..c4753c9dc8dee6d2e171eb5a5c322f079bf08410 100644 (file)
@@ -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();
 
index 5b0f64142ca2699118a490cdf4e1022e02e2283b..8a7dc84655ce533af947a3ceeef834c64f93000b 100644 (file)
@@ -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;
index 61c9fc0eb61e5b8f5d1162d858ae57397518879e..e5609fb599bc4824e47dfe366e77d0bd9594163d 100644 (file)
@@ -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;
index 14a04e47c9193cb7364b7a2190f4df4525058e32..8df4d9bbc4c5bb8dc9c0822bbf2b044bf3d89b91 100644 (file)
@@ -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();
 
index c493d9bb7b32e7412b8b594bd3ecb5b0217d5798..eaed5f9a1f6c34112a57dadd15212022bc62d31c 100644 (file)
@@ -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;
index b1afcfd6631e03eb0709e47b28229bd49932e0ee..c44b882b79b2740298361b9a7020b9edfbed67b9 100644 (file)
@@ -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;
index 54de42c2bd564fb9cc2bdd9fc1834629b661798b..cab3a82a1feb93ac1654f5b228534bdc92b04ee5 100644 (file)
@@ -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());
 
index aa8ca321da4663d505f0edf8c12c119cb816ad44..185b8211f3194cadfac1baa7bb491cb9caba081b 100644 (file)
 #include <string.h>
 #include <errno.h>
 
-#ifdef __linux__
-#include <sys/utsname.h>
-#endif
-
 #ifdef HAVE_POLL_H
 #include <poll.h>
 #else
@@ -47,7 +43,6 @@
 #include <pulsecore/rtclock.h>
 #include <pulsecore/macro.h>
 #include <pulsecore/llist.h>
-#include <pulsecore/rtsig.h>
 #include <pulsecore/flist.h>
 #include <pulsecore/core-util.h>
 #include <pulsecore/winsock.h>
@@ -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, &micro) != 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) {
index 08776ef099da4aa15189a0261e3d66955b3df331..d2d69cade7fd279c3a26a58858457c9f1f37c892 100644 (file)
@@ -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 (file)
index 4cd6aa8..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/***
-  This file is part of PulseAudio.
-
-  Copyright 2004-2006 Lennart Poettering
-  Copyright 2006 Pierre Ossman <ossman@cendio.se> 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 <config.h>
-#endif
-
-#include <signal.h>
-
-#include <pulsecore/macro.h>
-#include <pulsecore/flist.h>
-#include <pulsecore/once.h>
-#include <pulsecore/thread.h>
-#include <pulsecore/core-util.h>
-
-#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 (file)
index e414122..0000000
+++ /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
index 4ac96446046cb3fab660c72985b33b8fd5c9e4fd..1706cdfa56bad51fdb9aca3ffe16ce94ed72a1a8 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <pulsecore/log.h>
 #include <pulsecore/rtpoll.h>
-#include <pulsecore/rtsig.h>
 
 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);