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: >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 > >Martin >