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,7b6ebbd3cbca32ce X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!x35g2000hsb.googlegroups.com!not-for-mail From: "jimmaureenrogers@worldnet.att.net" Newsgroups: comp.lang.ada Subject: Re: run tasks on events Date: Wed, 28 May 2008 16:47:33 -0700 (PDT) Organization: http://groups.google.com Message-ID: <071c2e77-e37e-4d8d-91e8-533090ace9de@x35g2000hsb.googlegroups.com> References: NNTP-Posting-Host: 75.70.240.233 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1212018454 5067 127.0.0.1 (28 May 2008 23:47:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 28 May 2008 23:47:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x35g2000hsb.googlegroups.com; posting-host=75.70.240.233; posting-account=fZH-XgkAAADP-Rf8L8ppyFIdKUfh90k4 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:438 Date: 2008-05-28T16:47:33-07:00 List-Id: On May 28, 1:14 pm, Sebastian Hanigk wrote: > Hello, > > sorry if this is a stupid question, but as newcomer to Ada I've stumbled > over the following problem: having read a bit on HAL/S which has task > scheduling depending on signals and conditions, I'm a bit at loss how to > implement such functionality in Ada under the Ravenscar profile (no > dynamic task spawning). > > The example from the HAL/S user guide were tasks running e.g. only in > the free-fall or ascent/descent phase, started and terminated by > signals. > > Thanks for any help or pointers! > > Sebastian You can create a task which suspends until the ascent/descent phase. Simply have the task suspend on an accept statement. The task will complete its execution upon execution of a rendezvous associated with the accept statement. Alternately, the task can start out executing and be suspended upon a call to a blocked protected entry. None of this requires dynamic task allocation. Jim Rogers