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.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_12_24, FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bd25e0b79d624f85,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.196.232 with SMTP id ip8mr3388445pbc.6.1339702532068; Thu, 14 Jun 2012 12:35:32 -0700 (PDT) Path: l9ni50957pbj.0!nntp.google.com!news1.google.com!news4.google.com!news2.google.com!news.glorb.com!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Text_IO - thread safe? Date: Wed, 13 Jun 2012 15:47:21 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <3f81d79e-796f-4399-9fa0-d4f6e71d6d9e@googlegroups.com> NNTP-Posting-Host: 184.20.201.198 Mime-Version: 1.0 X-Trace: adenine.netfront.net 1339627646 63426 184.20.201.198 (13 Jun 2012 22:47:26 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Wed, 13 Jun 2012 22:47:26 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: <3f81d79e-796f-4399-9fa0-d4f6e71d6d9e@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-13T15:47:21-07:00 List-Id: On 06/13/2012 01:41 PM, awdorrin wrote: > I have a strange, legacy application that I am working with. > The main starts in a C application which launches several POSIX threads. > Some of these threads are C and some are Ada. > > Within one of the Ada modules, there is an array of records being sorted, while the other threads are polling a common module, before proceeding. > > In the 'rendezvous' routine, there is a Text_IO.Put_Line() that prints out the current thread id and what thread it thinks it is waiting for. > > ie: > > > > > > The thing is, during this while loop, the It's hard to address your specific concern, given the above. The ARM doesn't say anything about the task safety of Ada.Text_IO. Generally, operations on different File_Type objects, designating different external files, may be performed by different tasks at the same time without a problem. Operations on the same File_Type object, or on different File_Type objects that designate the same external file, may cause problems if performed by different tasks at the same time. However, implementations may make such operations task safe if they choose. -- Jeff Carter "What's the amount of the insult?" Never Give a Sucker an Even Break 104 --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---