Subject: pthread.h
From: "Gerrit P. Haase" <[email-masked]>
To: [email-masked]
Date: Thu, 17 May 2001 21:22:31 +0200

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