[polypaudio-commits] r834 - in /trunk/src: Makefile.am polyp/thread-mainloop.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue May 9 01:39:27 PDT 2006


Author: ossman
Date: Tue May  9 10:39:26 2006
New Revision: 834

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=834&root=polypaudio&view=rev
Log:
Add stubs for the threaded main loop so that we can compile it on
non-supported platforms (still can't run it though).

Modified:
    trunk/src/Makefile.am
    trunk/src/polyp/thread-mainloop.c

Modified: trunk/src/Makefile.am
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/Makefile.am?rev=834&root=polypaudio&r1=833&r2=834&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Tue May  9 10:39:26 2006
@@ -188,7 +188,8 @@
 		voltest \
 		memblockq-test \
 		sync-playback \
-		channelmap-test
+		channelmap-test \
+		thread-mainloop-test
 
 if HAVE_SIGXCPU
 noinst_PROGRAMS += \
@@ -204,12 +205,6 @@
 if HAVE_GLIB12
 noinst_PROGRAMS += \
 		mainloop-test-glib12
-endif
-
-# FIXME: We need to make thread-mainloop win32-compatible first
-if !OS_IS_WIN32
-noinst_PROGRAMS += \
-		thread-mainloop-test
 endif
 
 mainloop_test_SOURCES = tests/mainloop-test.c

Modified: trunk/src/polyp/thread-mainloop.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/thread-mainloop.c?rev=834&root=polypaudio&r1=833&r2=834&view=diff
==============================================================================
--- trunk/src/polyp/thread-mainloop.c (original)
+++ trunk/src/polyp/thread-mainloop.c Tue May  9 10:39:26 2006
@@ -42,7 +42,8 @@
 #include "mainloop.h"
 #include "thread-mainloop.h"
 
-#ifndef OS_IS_WIN32
+/* FIXME: Add defined(OS_IS_WIN32) when support is added */
+#if defined(HAVE_PTHREAD)
 
 struct pa_threaded_mainloop {
     pa_mainloop *real_mainloop;
@@ -219,8 +220,49 @@
     return pa_mainloop_get_api(m->real_mainloop);
 }
 
-#else /* OS_IS_WIN32 */
-
-// FIXME: Use Win32 primitives
-
-#endif /* OS_IS_WIN32 */
+#else /* defined(OS_IS_WIN32) || defined(HAVE_PTHREAD) */
+
+pa_threaded_mainloop *pa_threaded_mainloop_new(void) {
+	pa_log_error(__FILE__": Threaded main loop not supported on this platform");
+	return NULL;
+}
+
+void pa_threaded_mainloop_free(pa_threaded_mainloop* m) {
+	assert(0);
+}
+
+int pa_threaded_mainloop_start(pa_threaded_mainloop *m) {
+	assert(0);
+	return -1;
+}
+
+void pa_threaded_mainloop_stop(pa_threaded_mainloop *m) {
+	assert(0);
+}
+
+void pa_threaded_mainloop_lock(pa_threaded_mainloop *m) {
+	assert(0);
+}
+
+void pa_threaded_mainloop_unlock(pa_threaded_mainloop *m) {
+	assert(0);
+}
+
+void pa_threaded_mainloop_wait(pa_threaded_mainloop *m) {
+	assert(0);
+}
+
+void pa_threaded_mainloop_signal(pa_threaded_mainloop *m, int wait_for_release) {
+	assert(0);
+}
+
+int pa_threaded_mainloop_get_retval(pa_threaded_mainloop *m) {
+	assert(0);
+}
+
+pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop*m) {
+	assert(0);
+	return NULL;
+}
+
+#endif /* defined(OS_IS_WIN32) || defined(HAVE_PTHREAD) */




More information about the pulseaudio-commits mailing list