From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr 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 81D5EBB83 for ; Wed, 24 May 2006 19:20:08 +0200 (CEST) Received: from chokecherry.srv.cs.cmu.edu (CHOKECHERRY.SRV.CS.CMU.EDU [128.2.185.41]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k4OHK6Bv004972 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Wed, 24 May 2006 19:20:08 +0200 Received: from stratocaster.home (c-24-3-154-200.hsd1.pa.comcast.net [24.3.154.200]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.5/8.13.5) with ESMTP id k4OHK6bC028976 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 24 May 2006 13:20:06 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.61) (envelope-from ) id 1Fix1h-0000et-VB for caml-list@yquem.inria.fr; Wed, 24 May 2006 13:20:05 -0400 Date: Wed, 24 May 2006 13:20:05 -0400 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] opening/reading a rtai fifo Message-ID: <20060524172005.GA2515@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: <1148489253.44748e25b2321@webmailetu.univ-orleans.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1148489253.44748e25b2321@webmailetu.univ-orleans.fr> User-Agent: Mutt/1.5.11+cvs20060403 From: Eric Cooper X-Miltered: at nez-perce with ID 447495C6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; univ-orleans:01 sizeof:01 ocaml:01 unix:01 unix:01 buffered:01 stdlib:01 2006:98 wrote:01 caml-list:01 michel:01 functions:01 dev:01 dev:01 fifo:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Wed, May 24, 2006 at 06:47:33PM +0200, julien.michel@etu.univ-orleans.fr wrote: > I currently work on an embedded system, OS Linux 2.4-19 RTAI . > > I'd like to open and read out an RTAI FIFO (called /dev/rtf/0) > I used to do it with a "C" code such like: > fd = open("/dev/rtf/0",O_RDONLY); > read(fd,&f,sizeof(...)); etc... > > For now, I would like to do that with Ocaml. > [...] I suggest using the Unix.openfile and Unix.read functions them same way your current C code does, rather than the buffered I/O in stdlib. -- Eric Cooper e c c @ c m u . e d u