Add stubs for the threaded main loop so that we can compile it on

non-supported platforms (still can't run it though).


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@834 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-05-09 08:39:26 +00:00
parent 06e1867307
commit 4e71f20d6c
2 changed files with 48 additions and 11 deletions

View file

@ -188,7 +188,8 @@ noinst_PROGRAMS = \
voltest \
memblockq-test \
sync-playback \
channelmap-test
channelmap-test \
thread-mainloop-test
if HAVE_SIGXCPU
noinst_PROGRAMS += \
@ -206,12 +207,6 @@ 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
mainloop_test_CFLAGS = $(AM_CFLAGS)
mainloop_test_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la

View file

@ -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 @@ pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop*m) {
return pa_mainloop_get_api(m->real_mainloop);
}
#else /* OS_IS_WIN32 */
#else /* defined(OS_IS_WIN32) || defined(HAVE_PTHREAD) */
// FIXME: Use Win32 primitives
pa_threaded_mainloop *pa_threaded_mainloop_new(void) {
pa_log_error(__FILE__": Threaded main loop not supported on this platform");
return NULL;
}
#endif /* OS_IS_WIN32 */
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) */