From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA12072; Fri, 19 Apr 2002 09:42:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA12075 for ; Fri, 19 Apr 2002 09:42:10 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3J7g8L00593; Fri, 19 Apr 2002 09:42:08 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA12041; Fri, 19 Apr 2002 09:42:08 +0200 (MET DST) Date: Fri, 19 Apr 2002 09:42:08 +0200 From: Xavier Leroy To: Noel Welsh Cc: caml-list@inria.fr Subject: Re: [Caml-list] Using threads in compiled code Message-ID: <20020419094208.C11763@pauillac.inria.fr> References: <20020418074543.95391.qmail@web11204.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20020418074543.95391.qmail@web11204.mail.yahoo.com>; from noelwelsh@yahoo.com on Thu, Apr 18, 2002 at 12:45:43AM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I'm writing a commercial application in O'Caml. We > need to run on all the main platforms (Linux, Windows > and Mac) and we'd like to use the native code compiler > and threads. > > My first question: does O'Caml support threads in > compiled code in all the above platforms? Linux: yes. Windows: yes. Mac: not yet by lack of (full) POSIX threads, but it is likely that future versions of MacOS X will have it. > My second question: how do I get threads to work? I'm > currently developing on Linux and there is no > threads.cmxa in my /usr/lib/ocaml (3.04 via Debian). > The O'Caml book suggests I need to download and > compile my own ocamlopt including pthreads support. > Is this correct? Yes. There is a configuration-time choice between bytecode-only threads and system threads (pthreads). Depending on what the author of the OCaml package chose, you may have to recompile from sources and select system threads. > What do I do for Windows? Nothing! The Windows port of OCaml uses system (Win32) threads, both in bytecode and native-code. Keep us informed with your commercial application. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners