Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 52036 invoked from network); 21 Aug 2007 17:21:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2007 17:21:39 -0000 Received: (qmail 23941 invoked by uid 500); 21 Aug 2007 17:21:36 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 23882 invoked by uid 500); 21 Aug 2007 17:21:36 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 23864 invoked by uid 99); 21 Aug 2007 17:21:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 10:21:36 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 17:22:07 +0000 Received: from qxvcexch01.ad.quovadx.com ([192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id l7LHLBK1018601 for ; Tue, 21 Aug 2007 17:21:11 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Aug 2007 11:20:21 -0600 Message-ID: <46CB1F06.7020407@roguewave.com> Date: Tue, 21 Aug 2007 11:21:10 -0600 From: Martin Sebor Organization: Rogue Wave Software, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r563682 - in /incubator/stdcxx/trunk/src: once.cpp once.h References: <20070807222411.3E1C81A981A@eris.apache.org> <7BDB2168BEAEF14C98F1901FD2DE6438C9158B@epmsa009.minsk.epam.com> <46C1DAB6.2000908@roguewave.com> <7BDB2168BEAEF14C98F1901FD2DE6438D3EA55@epmsa009.minsk.epam.com> <46CB14BF.6040400@roguewave.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Aug 2007 17:20:21.0695 (UTC) FILETIME=[8DC0C4F0:01C7E417] X-Virus-Checked: Checked by ClamAV on apache.org 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 > >> 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 >>