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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,21f034c3990be45c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-25 13:36:02 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Tilman Gloetzner Newsgroups: comp.lang.ada Subject: Re: Device file not closing on close command Date: Sat, 26 May 2001 00:30:29 +0200 Organization: U und Z Message-ID: <3B0EDD05.A696B308@uundz.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 990822768 07 23350 kAHpS2sVSIHZHH 010525 20:32:48 X-Complaints-To: abuse@t-online.com X-Sender: 0931406720-0001@t-dialin.net X-Mailer: Mozilla 4.76 [de] (X11; U; Linux 2.4.0-64GB-SMP i686) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:7779 Date: 2001-05-26T00:30:29+02:00 List-Id: 1) I replaced "or delay" by "else", and "else delay". No change. 2) I changed the delay to 0.02. No change. 3) Even though the task runs in a busy loop, the load remains low (How could I implement the task without a busy loop ?). 4) Task switching seems not to be a problem, because the main procedure always sucessfully rendezvous with the "close" - entry of the task ("closing device" is printed every time) 5) The serial device (gps receiver) I am using is a PCMCIA card that behaves like a serial interface. If I run the program for the first time, it closes the device file and terminates successfully -- any further attempt ends in a blocking close command. This is is independent from the delay time (I tried 0.0,0.01, and 0.2). If remove the card and reinsert it (this reloads the serial driver), it works again for one time. From that behaviour I would think that the blocking is either related to the linux serial driver, or the the implementation of the gnat library. Any comments on that ? "Beard, Frank" wrote: > > Using Aonix ObjectAda on Windows NT, we found that a "delay 0.0" had > no effect. I haven't tried it with the latest version of the compiler, > so I don't know if that has changed. But, at the time we had to use > a delay of 0.02 to get it to switch. > > -----Original Message----- > From: Ted Dennison [mailto:dennison@telepath.com] > > In article , Ted Dennison says... > > > >In article <3B0D5544.ED114B7E@uundz.de>, Tilman Gloetzner says... > > > >> select > >.. > >> or > >> delay(0.0); > >.. > >> end select; > > > >I doubt this has much to do with your problem, but you should probably be > using > >an "else" rather than an "or delay 0.0". > ..and you probably shouldn't be using either in a tight loop, like you are > doing here. That's a busy loop. It could be that your task is hogging all > the > CPU in this busy loop, and is not giving your main task a chance to call the > Quit entry. But since it isn't higher priority, and delay is supposed to act > as > a scheduling point, I'd be suprised if this was the problem.