summaryrefslogtreecommitdiffstats
path: root/plzip.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:18:10 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:18:10 +0000
commit9a128a28677f07ec804c5b22d3050181a5cb2b6b (patch)
tree9f599e62fee7c29192b22cb4876bc5a6b4ef0743 /plzip.h
parentAdding debian version 0.4-1. (diff)
downloadplzip-9a128a28677f07ec804c5b22d3050181a5cb2b6b.tar.xz
plzip-9a128a28677f07ec804c5b22d3050181a5cb2b6b.zip
Merging upstream version 0.5.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'plzip.h')
-rw-r--r--plzip.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/plzip.h b/plzip.h
index 6615fc1..a0d15e3 100644
--- a/plzip.h
+++ b/plzip.h
@@ -89,7 +89,7 @@ public:
{
xlock( &mutex );
++check_counter;
- while( num_free == 0 )
+ while( num_free <= 0 )
{ ++wait_counter; xwait( &slot_av, &mutex ); }
--num_free;
xunlock( &mutex );
@@ -98,7 +98,7 @@ public:
void leave_slot() // return a slot to the tally
{
xlock( &mutex );
- if( num_free++ == 0 ) xsignal( &slot_av );
+ if( ++num_free == 1 ) xsignal( &slot_av );
xunlock( &mutex );
}
};
@@ -107,13 +107,14 @@ public:
int compress( const int data_size, const int dictionary_size,
const int match_len_limit, const int num_workers,
const int num_slots, const int infd, const int outfd,
- const int debug_level );
+ const Pretty_print & pp, const int debug_level );
/*-------------------- Defined in decompress.cc --------------------*/
-int decompress( const int infd, const int outfd, const Pretty_print & pp,
- const bool testing );
+int decompress( const int num_workers, const int num_slots,
+ const int infd, const int outfd, const Pretty_print & pp,
+ const int debug_level, const bool testing );
/*----------------------- Defined in main.cc -----------------------*/