stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: svn commit: r563682 - in /incubator/stdcxx/trunk/src: once.cpp once.h
Date Tue, 21 Aug 2007 17:21:10 GMT
Travis Vitek wrote:
> I'm sure you mean pthread_once() not pthread_create(). :) 

Yes, that's what I meant, thanks. (Even though the issue with
pthread_create() would be the same.)


>> 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:
>> Martin

View raw message