This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: PATCH: Allow gcc/gthr* to be compiled by C++ as well as C


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


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