summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-06-02 22:56:20 +0000
committerLennart Poettering <lennart@poettering.net>2006-06-02 22:56:20 +0000
commit16a275a9fddcf9216941cae4a002f0902ae5df88 (patch)
tree3403d4ad8c0530faa8f1e71a56bb097154b377d2 /src
parent441362a50b8c7e190b98066198555832a95ef064 (diff)
actually build cpulimit support if SIGXCPU is available
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1005 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r--src/daemon/cpulimit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index 2cc37be6..d537b9db 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -26,6 +26,7 @@
#include <polyp/error.h>
#include <polypcore/core-util.h>
+#include <polypcore/core-error.h>
#include <polypcore/log.h>
#include "cpulimit.h"
@@ -62,8 +63,8 @@
/* Check every 10s */
#define CPUTIME_INTERVAL_SOFT (10)
-/* Recheck after 2s */
-#define CPUTIME_INTERVAL_HARD (2)
+/* Recheck after 5s */
+#define CPUTIME_INTERVAL_HARD (5)
/* Time of the last CPU load check */
static time_t last_time = 0;
@@ -155,7 +156,7 @@ static void signal_handler(int sig) {
}
/* Callback for IO events on the FIFO */
-static void callback(pa_mainloop_api*m, pa_io_event*e, int fd, pa_io_event_flags f, void *userdata) {
+static void callback(pa_mainloop_api*m, pa_io_event*e, int fd, pa_io_event_flags_t f, void *userdata) {
char c;
assert(m && e && f == PA_IO_EVENT_INPUT && e == io_event && fd == the_pipe[0]);
read(the_pipe[0], &c, sizeof(c));