Mercurial > audlegacy
changeset 176:87c5d621f8d2 trunk
[svn] Use GThread instead of pthread.
author | chainsaw |
---|---|
date | Sun, 13 Nov 2005 12:55:07 -0800 |
parents | e9560c076daa |
children | f394090439df |
files | Plugins/Input/mikmod/Makefile.am Plugins/Input/mikmod/mikmod-plugin.h Plugins/Input/mikmod/plugin.c |
diffstat | 3 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Input/mikmod/Makefile.am Sun Nov 13 12:51:07 2005 -0800 +++ b/Plugins/Input/mikmod/Makefile.am Sun Nov 13 12:55:07 2005 -0800 @@ -8,7 +8,7 @@ INCLUDES = @GTK_CFLAGS@ @LIBMIKMOD_CFLAGS@ -I$(top_builddir)/intl -I$(top_srcdir) libmikmod_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libmikmod_la_LIBADD = @GTK_LIBS@ @PTHREAD_LIBS@ \ +libmikmod_la_LIBADD = @GTK_LIBS@ \ @LIBMIKMOD_LIBS@ @LIBMIKMOD_LDADD@ libmikmod_la_SOURCES = drv_xmms.c mikmod-plugin.h plugin.c mikmod.xpm
--- a/Plugins/Input/mikmod/mikmod-plugin.h Sun Nov 13 12:51:07 2005 -0800 +++ b/Plugins/Input/mikmod/mikmod-plugin.h Sun Nov 13 12:55:07 2005 -0800 @@ -4,7 +4,6 @@ #include <string.h> #include <stdio.h> #include <limits.h> -#include <pthread.h> #include <gtk/gtk.h> #include "audacious/plugin.h" #include <mikmod.h>
--- a/Plugins/Input/mikmod/plugin.c Sun Nov 13 12:51:07 2005 -0800 +++ b/Plugins/Input/mikmod/plugin.c Sun Nov 13 12:55:07 2005 -0800 @@ -43,7 +43,7 @@ static void configure(); static void config_ok(GtkWidget * widget, gpointer data); -static pthread_t decode_thread; +static GThread *decode_thread; MIKMODConfig mikmod_cfg; extern gboolean mikmod_xmms_audio_error; @@ -142,7 +142,7 @@ if (mikmod_going) { mikmod_going = 0; - pthread_join(decode_thread, NULL); + g_thread_join(decode_thread); } } @@ -382,7 +382,7 @@ back the forth from pattrens */ mikmod_ip.set_info(mf->songname, -1, ((mf->bpm * 1000)), md_mixfreq, channelcnt); - pthread_create(&decode_thread, NULL, play_loop, NULL); + decode_thread = g_thread_create((GThreadFunc)play_loop, NULL, TRUE, NULL); return; } @@ -404,7 +404,7 @@ mikmod_going = 0; MikMod_Exit(); - pthread_exit(NULL); + g_thread_exit(NULL); } static void configure()