PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
#include <windows.h>
#include <pulse/xmalloc.h>
-#include <pulsecore/log.h>
#include <pulsecore/once.h>
#include "thread.h"
return 0;
}
-pa_thread* pa_thread_new(pa_thread_func_t thread_func, void *userdata) {
+pa_thread* pa_thread_new(const char *name, pa_thread_func_t thread_func, void *userdata) {
pa_thread *t;
+ DWORD thread_id;
assert(thread_func);
t->thread_func = thread_func;
t->userdata = userdata;
- t->thread = CreateThread(NULL, 0, internal_thread_func, t, 0, NULL);
+ t->thread = CreateThread(NULL, 0, internal_thread_func, t, 0, &thread_id);
if (!t->thread) {
pa_xfree(t);
return pa_tls_get(thread_tls);
}
+void* pa_thread_get_data(pa_thread *t) {
+ pa_assert(t);
+
+ return t->userdata;
+}
+
+void pa_thread_set_data(pa_thread *t, void *userdata) {
+ pa_assert(t);
+
+ t->userdata = userdata;
+}
+
+void pa_thread_set_name(pa_thread *t, const char *name) {
+ /* Not implemented */
+}
+
+const char *pa_thread_get_name(pa_thread *t) {
+ /* Not implemented */
+ return NULL;
+}
+
void pa_thread_yield(void) {
Sleep(0);
}