diff options
Diffstat (limited to '')
-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 |