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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,75fea881fcdefe0 X-Google-Attributes: gid103376,public From: James E. Hopper Subject: Re: A Text_IO question I never dared to ask... Date: 1996/07/02 Message-ID: <4rac4g$pc5@eri2.erinet.com>#1/1 X-Deja-AN: 163235121 distribution: world references: content-type: text/plain; charset=ISO-8859-1 x-xxmessage-id: organization: Personal mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-07-02T00:00:00+00:00 List-Id: > >This is something that has been bugging me for some time, but to which I >still cannot find a reasonable answer: > > Why is there no record (or even file) locking in Text_IO ??? Actually the provinzono (spelling??) version of the pthreads that is used in linux (and now gnat-mac) comes with threadsafe libc. among the features of which is that the basic stdIO routines used by text_io are all using lock, unlock calls around them. i am NOT a c or pthreads expert but since a bug in the latest pthreads beta code made text edit hang waiting for a missing unlock until i fixed it for the mac version i suspect they are doing what would be expected of such routines. i wrote a couple of tasks to intersperce text io between two competing tasks and they appear to work correctly. there is what proports to be a threadsafe malloc as part of this code as well though i havent verified how well it works in a multiprocessing environemnt at this time. I remember someone on CLA asking after this for sun. jim