]> code.delx.au - pulseaudio/commitdiff
remove yet another occurence of pthread_yield() by pa_thread_yield()
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Sep 2006 22:38:41 +0000 (22:38 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Sep 2006 22:38:41 +0000 (22:38 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1372 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/tests/interpol-test.c

index 3ec8a18f77f17c7e7897520e78eb323af96d414a..54bdd7750e606e707b5231b5537b575f8db7e870 100644 (file)
 #include <getopt.h>
 #include <math.h>
 
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
 #include <pulse/pulseaudio.h>
 #include <pulse/mainloop.h>
 
+#include <pulsecore/thread.h>
+
 static pa_context *context = NULL;
 static pa_stream *stream = NULL;
 static pa_mainloop_api *mainloop_api = NULL;
@@ -152,13 +146,7 @@ int main(int argc, char *argv[]) {
 
         tv = now;
         while (pa_timeval_diff(pa_gettimeofday(&now), &tv) < 1000)
-#ifdef HAVE_PTHREAD_YIELD
-            pthread_yield();
-#elif defined(OS_IS_WIN32)
-            Sleep(0);
-#else
-            ;
-#endif
+            pa_thread_yield();
     }
 
     if (m)