From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1BFB3BB91 for ; Thu, 20 Jan 2005 20:37:37 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0KJbaHk003975 for ; Thu, 20 Jan 2005 20:37:36 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA10797 for ; Thu, 20 Jan 2005 20:37:36 +0100 (MET) Received: from alex.barettalocal.com (host48-4.pool62211.interbusiness.it [62.211.4.48] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0KJbZO9003972 for ; Thu, 20 Jan 2005 20:37:36 +0100 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by alex.barettalocal.com (Postfix) with ESMTP id 2EFE22BB574; Thu, 20 Jan 2005 20:37:38 +0100 (CET) Message-ID: <41F00881.60406@barettadeit.com> Date: Thu, 20 Jan 2005 20:37:37 +0100 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: it, en-us, en MIME-Version: 1.0 To: Markus Mottl Cc: OCaml Subject: Re: [Caml-list] C-threads & callbacks References: <20050120182313.GB4919@quant3.janestcapital.quant> In-Reply-To: <20050120182313.GB4919@quant3.janestcapital.quant> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41F00880.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41F0087F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; baretta:01 caml-list:01 markus:01 mottl:01 wrote:01 interfacing:01 threads:01 ocaml-code:01 ocaml:01 runtime:01 baretta:01 ...:98 callbacks:01 callbacks:01 rewrite:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: Markus Mottl wrote: > Hi, > > I'm currently interfacing a 3rd-party library that spawns threads > to execute callbacks. I would like those callbacks to be handled by > OCaml-code, but have run into some issues here. > Just a thought: how about running two different processes which share relevant data through an mmapped file? The C-threads could communicate with the Ocaml world through this shared memory segment. I am not sure how much mileage you'll get out of this, but at least you would not have to rewrite the runtime system... Alex -- ********************************************************************* http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. +39 02 370 111 55 fax. +39 02 370 111 54 Our technology: The Application System/Xcaml (AS/Xcaml) The FreerP Project