Bug 16848 - missing } in pthread.h
Summary: missing } in pthread.h
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libc
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-08-24 09:16 UTC by Need Real Name
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2000-09-06 14:43:53 UTC

Attachments (Terms of Use)

Description Need Real Name 2000-08-24 09:16:05 UTC
/usr/include/pthread.h is missing a closing } in pthread_cleanup_push

it reads:
pthread_cleanup_push(routine,arg)                                     \
  { struct _pthread_cleanup_buffer
_buffer;                                   \
    _pthread_cleanup_push (&_buffer, (routine), (arg));

and should read:
pthread_cleanup_push(routine,arg)                                     \
  { struct _pthread_cleanup_buffer
_buffer;                                   \
    _pthread_cleanup_push (&_buffer, (routine), (arg)); }

the absence of this closing } leads to hard to find compile-errors.


Comment 1 Jakub Jelinek 2000-09-06 16:46:14 UTC
The compile errors are desirable, quoting pthread.h:
/* 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. */

Note You need to log in before you can comment on or make changes to this bug.