summaryrefslogtreecommitdiffstats
path: root/compress.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:15:42 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:15:56 +0000
commit4eb895adce37d5080310984546faf00db136d4ef (patch)
treeaa5e387425ea1b8f34ada52747cbca077a5047e7 /compress.cc
parentReleasing debian version 1.4-2. (diff)
downloadplzip-4eb895adce37d5080310984546faf00db136d4ef.tar.xz
plzip-4eb895adce37d5080310984546faf00db136d4ef.zip
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'compress.cc')
-rw-r--r--compress.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/compress.cc b/compress.cc
index ecc7e5e..56d5314 100644
--- a/compress.cc
+++ b/compress.cc
@@ -1,6 +1,6 @@
/* Plzip - Parallel compressor compatible with lzip
Copyright (C) 2009 Laszlo Ersek.
- Copyright (C) 2009-2015 Antonio Diaz Diaz.
+ Copyright (C) 2009-2016 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -77,14 +77,14 @@ int writeblock( const int fd, const uint8_t * const buf, const int size )
}
-void xinit( pthread_mutex_t * const mutex )
+void xinit_mutex( pthread_mutex_t * const mutex )
{
const int errcode = pthread_mutex_init( mutex, 0 );
if( errcode )
{ show_error( "pthread_mutex_init", errcode ); cleanup_and_fail(); }
}
-void xinit( pthread_cond_t * const cond )
+void xinit_cond( pthread_cond_t * const cond )
{
const int errcode = pthread_cond_init( cond, 0 );
if( errcode )
@@ -92,14 +92,14 @@ void xinit( pthread_cond_t * const cond )
}
-void xdestroy( pthread_mutex_t * const mutex )
+void xdestroy_mutex( pthread_mutex_t * const mutex )
{
const int errcode = pthread_mutex_destroy( mutex );
if( errcode )
{ show_error( "pthread_mutex_destroy", errcode ); cleanup_and_fail(); }
}
-void xdestroy( pthread_cond_t * const cond )
+void xdestroy_cond( pthread_cond_t * const cond )
{
const int errcode = pthread_cond_destroy( cond );
if( errcode )
@@ -196,14 +196,14 @@ public:
slot_tally( slots ), circular_buffer( slots, (Packet *) 0 ),
num_working( workers ), num_slots( slots ), eof( false )
{
- xinit( &imutex ); xinit( &iav_or_eof );
- xinit( &omutex ); xinit( &oav_or_exit );
+ xinit_mutex( &imutex ); xinit_cond( &iav_or_eof );
+ xinit_mutex( &omutex ); xinit_cond( &oav_or_exit );
}
~Packet_courier()
{
- xdestroy( &oav_or_exit ); xdestroy( &omutex );
- xdestroy( &iav_or_eof ); xdestroy( &imutex );
+ xdestroy_cond( &oav_or_exit ); xdestroy_mutex( &omutex );
+ xdestroy_cond( &iav_or_eof ); xdestroy_mutex( &imutex );
}
// make a packet with data received from splitter