summaryrefslogtreecommitdiff
path: root/src/archive
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive')
-rw-r--r--src/archive/ArchiveFile.hxx3
-rw-r--r--src/archive/plugins/Bzip2ArchivePlugin.cxx16
-rw-r--r--src/archive/plugins/Iso9660ArchivePlugin.cxx10
-rw-r--r--src/archive/plugins/ZzipArchivePlugin.cxx10
4 files changed, 18 insertions, 21 deletions
diff --git a/src/archive/ArchiveFile.hxx b/src/archive/ArchiveFile.hxx
index 00c528e40..7118f78ac 100644
--- a/src/archive/ArchiveFile.hxx
+++ b/src/archive/ArchiveFile.hxx
@@ -23,7 +23,6 @@
#include "input/Ptr.hxx"
class Mutex;
-class Cond;
class ArchiveVisitor;
class ArchiveFile {
@@ -43,7 +42,7 @@ public:
* @param path the path within the archive
*/
virtual InputStreamPtr OpenStream(const char *path,
- Mutex &mutex, Cond &cond) = 0;
+ Mutex &mutex) = 0;
};
#endif
diff --git a/src/archive/plugins/Bzip2ArchivePlugin.cxx b/src/archive/plugins/Bzip2ArchivePlugin.cxx
index ec29f81f9..60d2137f3 100644
--- a/src/archive/plugins/Bzip2ArchivePlugin.cxx
+++ b/src/archive/plugins/Bzip2ArchivePlugin.cxx
@@ -28,7 +28,6 @@
#include "../ArchiveVisitor.hxx"
#include "input/InputStream.hxx"
#include "input/LocalOpen.hxx"
-#include "thread/Cond.hxx"
#include "fs/Path.hxx"
#include <bzlib.h>
@@ -54,7 +53,7 @@ public:
}
InputStreamPtr OpenStream(const char *path,
- Mutex &mutex, Cond &cond) override;
+ Mutex &mutex) override;
};
class Bzip2InputStream final : public InputStream {
@@ -69,7 +68,7 @@ class Bzip2InputStream final : public InputStream {
public:
Bzip2InputStream(const std::shared_ptr<InputStream> &_input,
const char *uri,
- Mutex &mutex, Cond &cond);
+ Mutex &mutex);
~Bzip2InputStream();
/* virtual methods from InputStream */
@@ -106,8 +105,7 @@ static std::unique_ptr<ArchiveFile>
bz2_open(Path pathname)
{
static Mutex mutex;
- static Cond cond;
- auto is = OpenLocalInputStream(pathname, mutex, cond);
+ auto is = OpenLocalInputStream(pathname, mutex);
return std::make_unique<Bzip2ArchiveFile>(pathname, std::move(is));
}
@@ -115,8 +113,8 @@ bz2_open(Path pathname)
Bzip2InputStream::Bzip2InputStream(const std::shared_ptr<InputStream> &_input,
const char *_uri,
- Mutex &_mutex, Cond &_cond)
- :InputStream(_uri, _mutex, _cond),
+ Mutex &_mutex)
+ :InputStream(_uri, _mutex),
input(_input)
{
Open();
@@ -129,9 +127,9 @@ Bzip2InputStream::~Bzip2InputStream()
InputStreamPtr
Bzip2ArchiveFile::OpenStream(const char *path,
- Mutex &mutex, Cond &cond)
+ Mutex &mutex)
{
- return std::make_unique<Bzip2InputStream>(istream, path, mutex, cond);
+ return std::make_unique<Bzip2InputStream>(istream, path, mutex);
}
inline bool
diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx
index 971f30275..106c0097b 100644
--- a/src/archive/plugins/Iso9660ArchivePlugin.cxx
+++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx
@@ -75,7 +75,7 @@ public:
virtual void Visit(ArchiveVisitor &visitor) override;
InputStreamPtr OpenStream(const char *path,
- Mutex &mutex, Cond &cond) override;
+ Mutex &mutex) override;
};
/* archive open && listing routine */
@@ -144,9 +144,9 @@ class Iso9660InputStream final : public InputStream {
public:
Iso9660InputStream(const std::shared_ptr<Iso9660> &_iso,
const char *_uri,
- Mutex &_mutex, Cond &_cond,
+ Mutex &_mutex,
iso9660_stat_t *_statbuf)
- :InputStream(_uri, _mutex, _cond),
+ :InputStream(_uri, _mutex),
iso(_iso), statbuf(_statbuf) {
size = statbuf->size;
SetReady();
@@ -163,14 +163,14 @@ public:
InputStreamPtr
Iso9660ArchiveFile::OpenStream(const char *pathname,
- Mutex &mutex, Cond &cond)
+ Mutex &mutex)
{
auto statbuf = iso9660_ifs_stat_translate(iso->iso, pathname);
if (statbuf == nullptr)
throw FormatRuntimeError("not found in the ISO file: %s",
pathname);
- return std::make_unique<Iso9660InputStream>(iso, pathname, mutex, cond,
+ return std::make_unique<Iso9660InputStream>(iso, pathname, mutex,
statbuf);
}
diff --git a/src/archive/plugins/ZzipArchivePlugin.cxx b/src/archive/plugins/ZzipArchivePlugin.cxx
index 0fbc4cc35..18f5fa07b 100644
--- a/src/archive/plugins/ZzipArchivePlugin.cxx
+++ b/src/archive/plugins/ZzipArchivePlugin.cxx
@@ -60,7 +60,7 @@ public:
virtual void Visit(ArchiveVisitor &visitor) override;
InputStreamPtr OpenStream(const char *path,
- Mutex &mutex, Cond &cond) override;
+ Mutex &mutex) override;
};
/* archive open && listing routine */
@@ -92,9 +92,9 @@ class ZzipInputStream final : public InputStream {
public:
ZzipInputStream(const std::shared_ptr<ZzipDir> _dir, const char *_uri,
- Mutex &_mutex, Cond &_cond,
+ Mutex &_mutex,
ZZIP_FILE *_file)
- :InputStream(_uri, _mutex, _cond),
+ :InputStream(_uri, _mutex),
dir(_dir), file(_file) {
//we are seekable (but its not recommendent to do so)
seekable = true;
@@ -118,7 +118,7 @@ public:
InputStreamPtr
ZzipArchiveFile::OpenStream(const char *pathname,
- Mutex &mutex, Cond &cond)
+ Mutex &mutex)
{
ZZIP_FILE *_file = zzip_file_open(dir->dir, pathname, 0);
if (_file == nullptr)
@@ -126,7 +126,7 @@ ZzipArchiveFile::OpenStream(const char *pathname,
pathname);
return std::make_unique<ZzipInputStream>(dir, pathname,
- mutex, cond,
+ mutex,
_file);
}