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,c4bd2a19251049b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: best practice: error handling Date: Sat, 11 Jun 2011 17:12:23 +0100 Organization: A noiseless patient Spider Message-ID: References: <0b95a2a1-6e3d-4ad1-a832-e3099a9bce37@v8g2000yqb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="25362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IzElOr2y0v8CyrvF7z5Cqwss/U2Qe16k=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:ZKl+RvQ+cExofXMjUmdGcHOBZSw= sha1:lLaeaWwN4BI0LwRdXuUFmp49/bc= Xref: g2news1.google.com comp.lang.ada:19755 Date: 2011-06-11T17:12:23+01:00 List-Id: "Yannick Duchêne (Hibou57)" writes: > I would say : at least the “errno” strategy, is not concurrency > friendly. if two threads of a same process commit errors, then you are > in trouble (one may overwrite the “errno” value of the > other). Exceptions would be cleaner for such a case (providing your > “errno” is not owned by threads). In VxWorks, errno is task-specific. (with GNAT, all Ada tasks are VxWorks tasks, but there are VxWorks tasks which aren't Ada tasks).