This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pthread.h


Hallo,

maybe someone is able to explain this part of pthread.h to me?

Line 99:
========
/* Macros for cleanup_push and pop; 
 * The function definitions are
void pthread_cleanup_push(void (*routine)(void*), void *arg);
void pthread_cleanup_pop(int execute);
*/
typedef void __cleanup_routine_type (void *);

#define pthread_cleanup_push (fn, arg) { __cleanup_routine_type __cleanup_routine=fn; \
void *__cleanup_param=arg;
#define pthread_cleanup_pop (execute) if (execute) __cleanup_routine(__cleanup_param); }


I get errors when calling pthread_cleanup_push: 
===============================================
 `fn' undeclared (first use in this function)
 `arg' undeclared (first use in this function)
 parse error before `{'

When calling pthread_cleanup_pop:
=================================
 `execute' undeclared (first use in this function)
 parse error before `if'

And additional:
===============
 At top level:
 parse error before `0'

gph

-- 
=^..^=

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]