This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH: Allow gcc/gthr* to be compiled by C++ as well as C
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: PATCH: Allow gcc/gthr* to be compiled by C++ as well as C
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Tue, 5 Jun 2001 10:14:05 -0500 (CDT)
- Cc: jason_merrill at redhat dot com
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
- References: <200105301345.f4UDjuo32030@latour.rsch.comm.mot.com>
In article <m3g0dfi5hx.fsf@prospero.cambridge.redhat.com> you write:
> Shouldn't those all be void (*)(), not void *?
>>! static void *__gthread_active_ptr = (void *) &pthread_create;
I don't think so. No function calls are ever made through
__gthread_active_ptr. It is used only as a boolean flag in code to
determine if (e.g.) pthread_create is a weak symbol with value 0.
In other implementations of the gthr.h interface (e.g. win32),
__gthread_active_ptr might map to a symbol known to exist in the
threaded C library with value 1 and exist in the non-threaded C
library with a value 0.
Why it is type (void*) instead of int is unknown to me.
Regards,
Loren