DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond

This commit is contained in:
Max Kellermann
2013-01-27 17:20:50 +01:00
parent 257a0dee75
commit 6f3d70b5e2
46 changed files with 182 additions and 234 deletions
+6 -4
View File
@@ -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