From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=AWL,DNS_FROM_RFC_WHOIS, SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 4F05DBB83 for ; Wed, 13 Sep 2006 18:57:28 +0200 (CEST) Received: from mail-red.research.att.com (mail-red.research.att.com [192.20.225.110]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k8DGvR4v027734 for ; Wed, 13 Sep 2006 18:57:28 +0200 Received: from [135.207.28.68] (fpdhcp068.research.att.com [135.207.28.68]) by bigmail.research.att.com (8.13.3+Sun/8.11.6) with ESMTP id k8DGvPne007307; Wed, 13 Sep 2006 12:57:25 -0400 (EDT) Message-ID: <45083871.9050707@research.att.com> Date: Wed, 13 Sep 2006 12:57:21 -0400 From: Trevor Jim User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: Jacques Garrigue Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] effect of -thread with ocamlc/ocamlopt -c References: <4506E954.8080207@research.att.com> <45081CC0.8010004@research.att.com> <20060914.013432.41630933.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20060914.013432.41630933.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45083877.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; -thread:01 ocamlc:01 ocamlopt:01 -trevor:01 threads:01 threads:01 -thread:01 pervasives:01 unix:01 iirc:01 wrote:01 marshal:01 caml-list:01 interfaces:01 interfaces:01 Thanks! I hope that the manual can incorporate this clarification. -Trevor Jacques Garrigue wrote: > The question is a bit different depending on whether you use system > threads or vmthreads. Note that if your platform supports system > threads, they are the ones used with the -thread option, while on > platforms without them -thread and -vmthread are equivalent. > > For system threads, the standard library is unchanged, and you don't > need the -thread option for modules that don't use threads. So there > is no problem. > > For vm threads, some modules from the standard library have different > implementations (namely, Pervasives, Marshal and Unix). So it is > essential that you use the -thread option to link with them. Note > however that the interfaces being identical, again you don't need > -thread for unrelated modules, so that in practice you shouldn't see > any difference with system threads. IIRC, at some point in the past > some modified functions were defined as external in the standard > library, making interfaces different, so that using -thread everywhere > was a strict requirement. > > Jacques Garrigue