aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:44:12 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:44:12 +0200
commitdff8c6450b8e3bd4dbc19fcce52faa8c5950b662 (patch)
tree04f98f71807789e86e627d9f7466c466326bd5b4
parent4255bba0f7cbd4a1ac24859a65f8d974d1fb5a9b (diff)
downloadmpd-dff8c6450b8e3bd4dbc19fcce52faa8c5950b662.tar.gz
mpd-dff8c6450b8e3bd4dbc19fcce52faa8c5950b662.tar.xz
mpd-dff8c6450b8e3bd4dbc19fcce52faa8c5950b662.zip
renamed decode.c to decoder_thread.c
It should be obvious in which thread or context a function is being executed at runtime. The code which was left in decode.c is for the decoder thread itself; give the file a better name.
Diffstat (limited to '')
-rw-r--r--src/Makefile.am3
-rw-r--r--src/decode.h2
-rw-r--r--src/decoder_thread.c (renamed from src/decode.c)2
-rw-r--r--src/decoder_thread.h25
-rw-r--r--src/main.c2
5 files changed, 30 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 28a949b4e..ff4db3523 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,6 +41,7 @@ mpd_headers = \
crossfade.h \
dbUtils.h \
decode.h \
+ decoder_thread.h \
decoder_api.h \
decoder_internal.h \
directory.h \
@@ -106,7 +107,7 @@ mpd_SOURCES = \
conf.c \
crossfade.c \
dbUtils.c \
- decode.c \
+ decoder_thread.c \
decoder_control.c \
decoder_api.c \
directory.c \
diff --git a/src/decode.h b/src/decode.h
index a1ed04157..0b1fe389f 100644
--- a/src/decode.h
+++ b/src/decode.h
@@ -55,8 +55,6 @@ struct decoder_control {
extern struct decoder_control dc;
-void decoderInit(void);
-
static inline int decoder_is_idle(void)
{
return dc.state == DECODE_STATE_STOP &&
diff --git a/src/decode.c b/src/decoder_thread.c
index 3362077ac..4104b585f 100644
--- a/src/decode.c
+++ b/src/decoder_thread.c
@@ -1,5 +1,6 @@
/* the Music Player Daemon (MPD)
* Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com)
+ * Copyright (C) 2008 Max Kellermann <max@duempel.org>
* This project's homepage is: http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -16,6 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "decoder_thread.h"
#include "decode.h"
#include "decoder_internal.h"
#include "player.h"
diff --git a/src/decoder_thread.h b/src/decoder_thread.h
new file mode 100644
index 000000000..439641e8a
--- /dev/null
+++ b/src/decoder_thread.h
@@ -0,0 +1,25 @@
+/* the Music Player Daemon (MPD)
+ * Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com)
+ * Copyright (C) 2008 Max Kellermann <max@duempel.org>
+ * This project's homepage is: http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef DECODER_THREAD_H
+#define DECODER_THREAD_H
+
+void decoderInit(void);
+
+#endif
diff --git a/src/main.c b/src/main.c
index 5a98b7e27..cfb38458d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,7 +25,7 @@
#include "conf.h"
#include "path.h"
#include "playerData.h"
-#include "decode.h"
+#include "decoder_thread.h"
#include "player.h"
#include "stats.h"
#include "sig_handlers.h"