diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2016-06-01 14:15:38 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2016-06-01 14:15:38 +0000 |
commit | b74ecd2cc2094c9644123e48ac3e2400fd8a3674 (patch) | |
tree | 8dbdba84d3f38fb2ea33a5f18fea7d42d16e3f8d /compress.cc | |
parent | Adding upstream version 1.4. (diff) | |
download | plzip-f4a51888079416a6f2b2a0623720feb37e608ebb.tar.xz plzip-f4a51888079416a6f2b2a0623720feb37e608ebb.zip |
Adding upstream version 1.5.upstream/1.5
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'compress.cc')
-rw-r--r-- | compress.cc | 18 |
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 |