From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f3d27f1fefd7e554 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Blocking I/O and Ravenscar References: <1190408890.068176.182160@n39g2000hsh.googlegroups.com> In-Reply-To: <1190408890.068176.182160@n39g2000hsh.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1190435499 12.201.97.213 (Sat, 22 Sep 2007 04:31:39 GMT) NNTP-Posting-Date: Sat, 22 Sep 2007 04:31:39 GMT Organization: AT&T ASP.att.net Date: Sat, 22 Sep 2007 04:31:39 GMT Xref: g2news2.google.com comp.lang.ada:2076 Date: 2007-09-22T04:31:39+00:00 List-Id: Maciej Sobczak wrote: > Basically, Ravenscar forbids any blocking operations except waiting on > a protected entry or a suspension object. > > How can I perform a blocking I/O without breaking this restriction? > > Let's say I would like to read a byte from a socket. > An entry with the simple barrier Is_Ready can do the job in terms of > the interface, but implementation-wise it only pushes the problem away > - who will set the Is_Ready flag after the byte is actually read from > the blocking physical device and put in the buffer? A separate task? > It would need to be non-Ravenscar - there seems to be a chicken&egg > problem here. I'm not sure where you got this idea; I don't recall any restrictions on blocking by tasks. -- Jeff Carter "English bed-wetting types." Monty Python & the Holy Grail 15