aboutsummaryrefslogtreecommitdiff
path: root/src/archive
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/archive
parent257a0dee758049586efbf0dc3f0339b0cef03456 (diff)
DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond
Diffstat (limited to 'src/archive')
-rw-r--r--src/archive/Bzip2ArchivePlugin.cxx9
-rw-r--r--src/archive/Iso9660ArchivePlugin.cxx2
-rw-r--r--src/archive/ZzipArchivePlugin.cxx2
3 files changed, 6 insertions, 7 deletions
diff --git a/src/archive/Bzip2ArchivePlugin.cxx b/src/archive/Bzip2ArchivePlugin.cxx
index c8d8f397..35373ed1 100644
--- a/src/archive/Bzip2ArchivePlugin.cxx
+++ b/src/archive/Bzip2ArchivePlugin.cxx
@@ -132,10 +132,9 @@ bz2_open(const char *pathname, GError **error_r)
int len;
//open archive
- static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
- context->istream = input_stream_open(pathname,
- g_static_mutex_get_mutex(&mutex),
- NULL,
+ static Mutex mutex;
+ static Cond cond;
+ context->istream = input_stream_open(pathname, mutex, cond,
error_r);
if (context->istream == NULL) {
delete context;
@@ -186,7 +185,7 @@ bz2_close(struct archive_file *file)
static struct input_stream *
bz2_open_stream(struct archive_file *file, const char *path,
- GMutex *mutex, GCond *cond,
+ Mutex &mutex, Cond &cond,
GError **error_r)
{
struct bz2_archive_file *context = (struct bz2_archive_file *) file;
diff --git a/src/archive/Iso9660ArchivePlugin.cxx b/src/archive/Iso9660ArchivePlugin.cxx
index d081fe33..3330e04c 100644
--- a/src/archive/Iso9660ArchivePlugin.cxx
+++ b/src/archive/Iso9660ArchivePlugin.cxx
@@ -176,7 +176,7 @@ struct iso9660_input_stream {
static struct input_stream *
iso9660_archive_open_stream(struct archive_file *file, const char *pathname,
- GMutex *mutex, GCond *cond,
+ Mutex &mutex, Cond &cond,
GError **error_r)
{
struct iso9660_archive_file *context =
diff --git a/src/archive/ZzipArchivePlugin.cxx b/src/archive/ZzipArchivePlugin.cxx
index 28c3f46a..9e5ba393 100644
--- a/src/archive/ZzipArchivePlugin.cxx
+++ b/src/archive/ZzipArchivePlugin.cxx
@@ -143,7 +143,7 @@ struct zzip_input_stream {
static struct input_stream *
zzip_archive_open_stream(struct archive_file *file,
const char *pathname,
- GMutex *mutex, GCond *cond,
+ Mutex &mutex, Cond &cond,
GError **error_r)
{
struct zzip_archive *context = (struct zzip_archive *) file;