aboutsummaryrefslogtreecommitdiffstats
path: root/src/InputStream.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-27 17:20:50 +0100
committerMax Kellermann <max@duempel.org>2013-01-27 18:39:32 +0100
commit6f3d70b5e24cebbd6fd8c3a665a801628ef912ff (patch)
tree88ab67b76bac4b88422c3debe7c46d6168a71934 /src/InputStream.hxx
parent257a0dee758049586efbf0dc3f0339b0cef03456 (diff)
downloadmpd-6f3d70b5e24cebbd6fd8c3a665a801628ef912ff.tar.gz
mpd-6f3d70b5e24cebbd6fd8c3a665a801628ef912ff.tar.xz
mpd-6f3d70b5e24cebbd6fd8c3a665a801628ef912ff.zip
DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond
Diffstat (limited to 'src/InputStream.hxx')
-rw-r--r--src/InputStream.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/InputStream.hxx b/src/InputStream.hxx
index 8a82888f0..2c868725e 100644
--- a/src/InputStream.hxx
+++ b/src/InputStream.hxx
@@ -22,6 +22,8 @@
#include "input_stream.h"
#include "check.h"
+#include "thread/Mutex.hxx"
+#include "thread/Cond.hxx"
#include "gcc.h"
#include <glib.h>
@@ -46,7 +48,7 @@ struct input_stream {
* This object is allocated by the client, and the client is
* responsible for freeing it.
*/
- GMutex *mutex;
+ Mutex *mutex;
/**
* A cond that gets signalled when the state of this object
@@ -56,7 +58,7 @@ struct input_stream {
* This object is allocated by the client, and the client is
* responsible for freeing it.
*/
- GCond *cond;
+ Cond *cond;
/**
* indicates whether the stream is ready for reading and
@@ -89,14 +91,14 @@ gcc_nonnull(1)
static inline void
input_stream_lock(struct input_stream *is)
{
- g_mutex_lock(is->mutex);
+ is->mutex->lock();
}
gcc_nonnull(1)
static inline void
input_stream_unlock(struct input_stream *is)
{
- g_mutex_unlock(is->mutex);
+ is->mutex->unlock();
}
#endif