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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,77efb4ab26922e3 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k13g2000hse.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Blocking syscalls in Tasks Date: Sat, 27 Sep 2008 14:54:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <49dd14a0-73b9-44b4-a599-c86da7229c6c@f36g2000hsa.googlegroups.com> NNTP-Posting-Host: 85.3.93.108 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1222552488 6160 127.0.0.1 (27 Sep 2008 21:54:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 27 Sep 2008 21:54:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k13g2000hse.googlegroups.com; posting-host=85.3.93.108; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2112 Date: 2008-09-27T14:54:48-07:00 List-Id: On 27 Wrz, 19:26, schwer...@gmail.com wrote: > Are tasks commonly implemented using threads You should expect that from the quality implementation. This not only gives some nice properties for potentially blocking I/O calls (exactly - that only the calling task gets blocked), but also allows to safely use system-level synchronization primitives (like mutexes) for interactions between tasks. Not that this would be recommended over standard Ada mechanisms, but it might actually happen even behind the scenes when using some external library. Knowing that Ada tasks are just system threads in disguise allows to use such libraries safely. Without this guarantee the interoperability of Ada would be limited. On the other hand, even this assumption (that tasks are threads in disguise) is not enough to assert that Ada code can be safely executed by threads that do not originate from or at least where not prepared by the Ada runtime, althought in a quality implementation this might be a very welcome property. I don't know whether GNAT provides this property. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada