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 UAA26800; Thu, 14 Jun 2001 20:36:50 +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 UAA25118 for ; Thu, 14 Jun 2001 20:36:49 +0200 (MET DST) Received: from johnson.mail.mindspring.net (johnson.mail.mindspring.net [207.69.200.177]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f5EIagX19697 for ; Thu, 14 Jun 2001 20:36:42 +0200 (MET DST) Received: from dylan (1Cust188.tnt3.tucson.az.da.uu.net [63.11.144.188]) by johnson.mail.mindspring.net (8.9.3/8.8.5) with SMTP id OAA05053 for ; Thu, 14 Jun 2001 14:36:39 -0400 (EDT) Message-ID: <00b201c0f500$f59483d0$210148bf@dylan> From: "David McClain" To: Subject: [Caml-list] Threading and C code Date: Thu, 14 Jun 2001 11:36:41 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I just wrote an bunch of C primitives to attach to an OCamlopt project, and some of these wait on internal semaphores, events, and mutexes. It appeared to me that these shut down the OCaml native threading system on Windows (98SE and NT/4.0). After searching through the sources for the threads lib I find that two entry points are used to negotiate this possibility -- enter_blocking_section() and leave_blocking_section(). These appear to be needed around any code that could possibly block. These aren't mentioned in any of the normal header files in /ocaml/lib/caml but I think they ought to be. Is this protocol subject to change? or can it be made a standard protocol for C external functions? - DM ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr