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.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 7620ABC6C for ; Tue, 5 Feb 2008 18:41:05 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAD8uqEfAXQInh2dsb2JhbACQLAEBAQgKKZZyhXo X-IronPort-AV: E=Sophos;i="4.25,308,1199660400"; d="scan'208";a="8796922" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 Feb 2008 18:41:04 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m15Hf2cI016710 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 5 Feb 2008 18:41:04 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHsuqEdIDvb1jGdsb2JhbACQLAEBAQgEDQoRBZZ0hXo X-IronPort-AV: E=Sophos;i="4.25,308,1199660400"; d="scan'208";a="7644668" Received: from ag-out-0708.google.com ([72.14.246.245]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Feb 2008 18:41:03 +0100 Received: by ag-out-0708.google.com with SMTP id 9so3844035agd.9 for ; Tue, 05 Feb 2008 09:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=eh8+J6H46DTnzID2Xunsy263DCt72dbDiAs1f/VDGfo=; b=VZxlImFLxnYvYrW+4eiR0f1UfEiMOX3zhGvocc8f8bGnIYe0So4MjqpYJ5oQvzDvF/7KgQbrgBXkXWxSUY0xGNkeqJ+TTaT9v96XFwL0OzAwisg3qA/QeU4VA8C1ao2xKA7WshbJkavE2NqgJwybxn49MqrCCzxk3JJQcRGFOJ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=F4kIbkIgREmDQors5cBx3Q9m7xnTagfSjjzS2/E/QglE5Wjr2++KEG5mjBoqDjy00/lfVG6DzwvWmJQ2u22oqWfpbmNYd3FqFWDuYce195gDhCz9VrJqSOHIoUjwYhgC1y8IImo5Gv0YxUfi2Pa1oGNEbtvJa+vM3VKVEMnbIXQ= Received: by 10.142.83.4 with SMTP id g4mr4520462wfb.28.1202233258946; Tue, 05 Feb 2008 09:40:58 -0800 (PST) Received: by 10.143.195.5 with HTTP; Tue, 5 Feb 2008 09:40:58 -0800 (PST) Message-ID: <9b415f950802050940m2f49137by41a32ba77b564e09@mail.gmail.com> Date: Tue, 5 Feb 2008 12:40:58 -0500 From: "Benedikt Grundmann" Sender: benedikt.grundmann@googlemail.com To: "Dmitry Bely" Subject: Re: [Caml-list] Ocaml debugger under Windows Cc: "Alain Frisch" , ocaml In-Reply-To: <90823c940802050923h77a95192gdabcd9c0807dccd6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <90823c940802050146u7cac0aape4e72b4fc6a3089@mail.gmail.com> <47A83251.7010306@frisch.fr> <90823c940802050923h77a95192gdabcd9c0807dccd6@mail.gmail.com> X-Google-Sender-Auth: 54bc5c03d2032b82 X-Miltered: at concorde with ID 47A89FAE.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; grundmann:01 ocaml:01 debugger:01 cheers:01 frisch:01 frisch:01 ocaml:01 mingw:01 mingw:01 debugger:01 iter:01 funct:01 funct:01 eintr:01 ocamldebug:01 Use Shawn Wagner's MsgQueue module to communicate between both threads in a select friendly way. http://raevnos.pennmush.org/code/ethread/doc/MsgQueue.html Cheers, Bene 2008/2/5, Dmitry Bely : > On Feb 5, 2008 12:54 PM, Alain Frisch wrote: > > Dmitry Bely wrote: > > > The topic has a long history [1], but since then nothing has actually > > > changed. It's easy to understand: INRIA people are busy and there are > > > probably quite few Ocaml users in the Windows land to worry about. So I > > > decided to do something myself :) (as it was with mingw port several > > > years ago). > > >... > > > If it's interesting for anyone I can publish a patch against Ocaml 3.10.1 > > > > Yes, that's definitely interesting for us! > > > > Is there any hope to build the server with the mingw or msvc port? > > As soon as the following function is rewritten: > > debugger/input_handling.ml > > (* Handle active files until `continue_main_loop' is false. *) > let main_loop () = > let old_state = !continue_main_loop in > try > continue_main_loop := true; > while !continue_main_loop do > try > let (input, _, _) = > select (List.map fst !active_files) [] [] (-1.) > in > List.iter > (function fd -> > let (funct, iochan) = (List.assoc fd !active_files) in > funct iochan) > input > with > Unix_error (EINTR, _, _) -> () > done; > continue_main_loop := old_state > with > x -> > continue_main_loop := old_state; > raise x > > here Unix.select() waits for both network and user input events. We > could split this into 2 threads, but how to interrupt network select() > when we going to exit? Well, we could use some small timeout value for > select() (say 500ms) and restart it the loop when !continue_main_loop > is set, but this looks not very elegant... Or it's OK? > > The point is not to modify win32unix library or write Win32-specific C > functions for ocamldebug. I believe it's necessary to be ever accepted > by INRIA. > > > - Dmitry Bely > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Calvin: I try to make everyone's day a little more surreal. (From Calvin & Hobbes)