incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <>
Subject RE: svn commit: r563682 - in /incubator/stdcxx/trunk/src: once.cpp once.h
Date Tue, 21 Aug 2007 17:10:54 GMT

I'm sure you mean pthread_once() not pthread_create(). :) 

>Martin Sebor wrote:
>Farid Zaripov wrote:
>>> Any suggestions?
>>   Why the internal function should be extern "C"?
>So they can be passed to pthread_create() which is in all cases
>I know of a C interface (i.e., it expects a pointer to a function
>with a C language linkage as an argument). Functions with different
>language linkage have distinct types and are incompatible with one
>another. Most compilers including MSVC and gcc) don't implement
>this rule and as a result present a serious portability problem.
>See the following gcc bug report for an example of such a problem:

View raw message