"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "try.h" between
pigz-2.5.tar.gz and pigz-2.6.tar.gz

About: pigz is a parallel implementation of gzip for modern multi-processor, multi-core machines.

try.h  (pigz-2.5):try.h  (pigz-2.6)
skipping to change at line 306 skipping to change at line 306
Note that a throw can only be caught within the same thread. A new and Note that a throw can only be caught within the same thread. A new and
unique try stack is created for each thread, so any attempt to throw across unique try stack is created for each thread, so any attempt to throw across
threads will fail with an assert, by virtue of reaching the end of the threads will fail with an assert, by virtue of reaching the end of the
stack. */ stack. */
#ifdef PTHREAD_ONCE_INIT #ifdef PTHREAD_ONCE_INIT
extern pthread_key_t try_key_; extern pthread_key_t try_key_;
void try_setup_(void); void try_setup_(void);
# define try_stack_ ((try_t_ *)pthread_getspecific(try_key_)) # define try_stack_ ((try_t_ *)pthread_getspecific(try_key_))
# define try_stack_set_(next) \ # define try_stack_set_(next) \
do { \ do { \
int try_ret_ = pthread_setspecific(try_key_, next); \ assert(pthread_setspecific(try_key_, next) == 0 && \
assert(try_ret_ == 0 && "try: pthread_setspecific() failed"); \ "try: pthread_setspecific() failed"); \
} while (0) } while (0)
#else /* !PTHREAD_ONCE_INIT */ #else /* !PTHREAD_ONCE_INIT */
extern try_t_ *try_stack_; extern try_t_ *try_stack_;
# define try_setup_() # define try_setup_()
# define try_stack_set_(next) try_stack_ = (next) # define try_stack_set_(next) try_stack_ = (next)
#endif /* PTHREAD_ONCE_INIT */ #endif /* PTHREAD_ONCE_INIT */
/* Try a block. The block should follow the invocation of try enclosed in { }. /* Try a block. The block should follow the invocation of try enclosed in { }.
The block must be immediately followed by an always or a catch. You must The block must be immediately followed by an always or a catch. You must
not goto or return out of the try block. A naked break or continue in the not goto or return out of the try block. A naked break or continue in the
try block will go to the end of the block. */ try block will go to the end of the block. */
#define TRY_TRY_ \ #define TRY_TRY_ \
do { \ do { \
try_t_ try_this_; \ try_t_ try_this_; \
int try_pushed_ = 1; \ volatile int try_pushed_ = 1; \
try_this_.ball.code = 0; \ try_this_.ball.code = 0; \
try_this_.ball.free = 0; \ try_this_.ball.free = 0; \
try_this_.ball.why = NULL; \ try_this_.ball.why = NULL; \
try_setup_(); \ try_setup_(); \
try_this_.next = try_stack_; \ try_this_.next = try_stack_; \
try_stack_set_(&try_this_); \ try_stack_set_(&try_this_); \
if (setjmp(try_this_.env) < 2) \ if (setjmp(try_this_.env) < 2) \
do { \ do { \
/* Execute the code between always and catch, whether or not something was /* Execute the code between always and catch, whether or not something was
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)