[pulseaudio-commits] r1933 - in /branches/lennart/src/pulsecore: rtclock.c rtclock.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Oct 7 06:54:16 PDT 2007


Author: lennart
Date: Sun Oct  7 15:54:15 2007
New Revision: 1933

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1933&root=pulseaudio&view=rev
Log:
Fix build; change return value of pa_rtclock_hrtimer() to pa_bool

Modified:
    branches/lennart/src/pulsecore/rtclock.c
    branches/lennart/src/pulsecore/rtclock.h

Modified: branches/lennart/src/pulsecore/rtclock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/rtclock.c?rev=1933&root=pulseaudio&r1=1932&r2=1933&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/rtclock.c (original)
+++ branches/lennart/src/pulsecore/rtclock.c Sun Oct  7 15:54:15 2007
@@ -53,12 +53,12 @@
 #ifdef CLOCK_MONOTONIC
         if (clock_gettime(CLOCK_MONOTONIC, &ts) >= 0)
             goto out;
-#endif        
+#endif
 
         no_monotonic = 1;
     }
 
-    pa_assert_se(clock_gettime(CLOCK_REALTIME, ts) == 0);
+    pa_assert_se(clock_gettime(CLOCK_REALTIME, &ts) == 0);
 
 out:
     pa_assert(tv);
@@ -75,22 +75,21 @@
 #endif
 }
 
-int pa_rtclock_hrtimer(void) {
+pa_bool_t pa_rtclock_hrtimer(void) {
 #ifdef HAVE_CLOCK_GETTIME
     struct timespec ts;
-    
+
 #ifdef CLOCK_MONOTONIC
     if (clock_getres(CLOCK_MONOTONIC, &ts) >= 0)
         return ts.tv_sec == 0 && ts.tv_nsec <= PA_HRTIMER_THRESHOLD_USEC*1000;
-#endif        
+#endif
 
     pa_assert_se(clock_getres(CLOCK_REALTIME, &ts) == 0);
     return ts.tv_sec == 0 && ts.tv_nsec <= PA_HRTIMER_THRESHOLD_USEC*1000;
 
 #else /* HAVE_CLOCK_GETTIME */
 
-    return 0;
+    return FALSE;
 
 #endif
 }
-

Modified: branches/lennart/src/pulsecore/rtclock.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/rtclock.h?rev=1933&root=pulseaudio&r1=1932&r2=1933&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/rtclock.h (original)
+++ branches/lennart/src/pulsecore/rtclock.h Sun Oct  7 15:54:15 2007
@@ -24,13 +24,15 @@
   USA.
 ***/
 
+#include <pulsecore/macro.h>
+
 struct timeval;
 
 /* Something like pulse/timeval.h but based on CLOCK_MONOTONIC */
 
 struct timeval *pa_rtclock_get(struct timeval *ts);
 pa_usec_t pa_rtclock_age(const struct timeval *tv);
-int pa_rtclock_hrtimer(void);
+pa_bool_t pa_rtclock_hrtimer(void);
 
 /* timer with a resolution better than this are considered high-resolution */
 #define PA_HRTIMER_THRESHOLD_USEC 10




More information about the pulseaudio-commits mailing list