[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: missing braces



>>>>> temu  writes:

 > hi,
 > in libc6-dev       (2.1.2-10) :

 > in phtread.h the compiler missings a closing brace:

 > 8<-------------------------
 > ../b # diff /usr/include/pthread.h /usr/include/pthread.h~
 > 478,479c478
 > <     _pthread_cleanup_push (&_buffer, (routine), (arg)); \
 > <   }
 > ---
>> _pthread_cleanup_push (&_buffer, (routine), (arg));
 > ../b # 
 > 8<-------------------------

No, that's correct.  See the following comment:

/* Install a cleanup handler: ROUTINE will be called with arguments ARG
   when the thread is cancelled or calls pthread_exit.  ROUTINE will also
   be called with arguments ARG when the matching pthread_cleanup_pop
   is executed with non-zero EXECUTE argument.
   pthread_cleanup_push and pthread_cleanup_pop are macros and must always
   be used in matching pairs at the same nesting level of braces. */

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


Reply to: