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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bdf72b2364b0da13 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.136.195 with SMTP id s3mr1145645bkt.5.1323681028121; Mon, 12 Dec 2011 01:10:28 -0800 (PST) Path: jh9ni2610bkb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!news.internetdienste.de!news.tu-darmstadt.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Interrupts handling in ADA Date: Mon, 12 Dec 2011 11:12:08 +0200 Organization: Tidorum Ltd Message-ID: <9kluo1FtlhU1@mid.individual.net> References: <30143086.6.1323549838421.JavaMail.geo-discussion-forums@vbbfq24> Mime-Version: 1.0 X-Trace: individual.net fz79z2b48vCcfNy5kiC8cQCOxrWNfHtx8qZHE7OQSMH3ZHvmYT Cancel-Lock: sha1:MRoYEtn9PUFoLWdHC7fuXsgA7KU= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2011-12-12T11:12:08+02:00 List-Id: On 11-12-12 05:19 , anon@att.net wrote: > -- Interrupts are not necessary. From you description a simple set of > -- tasks is all that is needed. > -- > -- This program outline uses three task to read three sockets and > -- after pre-processing and verifing data (if needed) passes this > -- data to a main task. The main task then can continue processing > -- this data. Just a small comment on a detail in the example: > task body Main is ... > begin ... > accept Acknowledge_1 ( Data : Unsigned_32 ) do > Task_1_Data := Data ; > -- process data from task 1 > end Acknowledge_1 ; The rendezvous between the Main task and task 1 continues until the "end Acknowledge_1". If the Main task processes the data from task 1 before the "end Acknowledge_1", as above, task 1 cannot do anything else during this processing. The program may be more responsive if the processing is done after the rendezvous, in this way: accept Acknowledge_1 ( Data : Unsigned_32 ) do Task_1_Data := Data ; end Acknowledge_1 ; -- process data from task 1 In this form, the call of Acknowledge_1 from task 1 returns before the processing, which means that task 1 can go on to do other things, while the Main task is processing the data in Task_1_Data. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .