This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: error in pthreads implementation?
- To: "Julian Hall" <jules at acris dot co dot uk>,<cygwin at cygwin dot com>
- Subject: Re: error in pthreads implementation?
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Sun, 8 Jul 2001 01:40:17 +1000
- References: <3B4713A7.55AE01CB@acris.co.uk>
----- Original Message -----
From: "Julian Hall" <jules@acris.co.uk>
To: <cygwin@cygwin.com>
Sent: Saturday, July 07, 2001 11:50 PM
Subject: error in pthreads implementation?
> I'm currently working on getting gcj to work properly with cygwin, and
> am working on threading code; I seem to have found a bug in the
> implementation of pthreads.h. This is quite possibly gcc 3.0
specific,
> but when the macro pthread_cleanup_push(...) is used, I get the
> following error from the compiler:
Cancellation points haven't been implemented beyond a set of defines to
allow programs to compile... It's on my rather extensive todo list
though :]. I suspect that you may need them fully functional for java
:[. Unfortunately I don't have a timeframe for when I'll get time to
implement them, but I'm more than willing to proivde guidance if you are
interested in getting cancellation points extant.
Rob
> ../../gcc-20010702/boehm-gc/cygwin_threads.c:455: function
> `__cleanup_routine' is initialized like a variable
>
> The attached diff seems to solve the problem, although it hasn't been
> thoroughly tested.
>
> Jules
>
>
------------------------------------------------------------------------
--------
> --- pthread.h.orig Sat Jul 7 12:47:48 2001
> +++ pthread.h Sat Jul 7 12:48:04 2001
> @@ -99,11 +99,11 @@
> /* 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 *);
> +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); }
>
>
>
------------------------------------------------------------------------
--------
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/