[polypaudio-commits] r1005 - in /trunk: configure.ac src/daemon/cpulimit.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Jun 2 15:56:22 PDT 2006


Author: lennart
Date: Sat Jun  3 00:56:20 2006
New Revision: 1005

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1005&root=polypaudio&view=rev
Log:
actually build cpulimit support if SIGXCPU is available

Modified:
    trunk/configure.ac
    trunk/src/daemon/cpulimit.c

Modified: trunk/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/configure.ac?rev=1005&root=polypaudio&r1=1004&r2=1005&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Jun  3 00:56:20 2006
@@ -204,7 +204,10 @@
 AC_TYPE_SIGNAL
 AC_TYPE_UID_T
 
-AC_CHECK_DEFINE([SIGXCPU], [signal.h], [HAVE_SIGXCPU=1], [HAVE_SIGXCPU=0])
+AC_CHECK_DEFINE([SIGXCPU], [signal.h], [
+HAVE_SIGXCPU=1
+AC_DEFINE([HAVE_SIGXCPU], 1, [Have SIGXCPU?])
+], [HAVE_SIGXCPU=0])
 AM_CONDITIONAL(HAVE_SIGXCPU, test "x$HAVE_SIGXCPU" = "x1")
 
 # Solaris lacks this

Modified: trunk/src/daemon/cpulimit.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/cpulimit.c?rev=1005&root=polypaudio&r1=1004&r2=1005&view=diff
==============================================================================
--- trunk/src/daemon/cpulimit.c (original)
+++ trunk/src/daemon/cpulimit.c Sat Jun  3 00:56:20 2006
@@ -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 @@
 }
 
 /* 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));




More information about the pulseaudio-commits mailing list