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.224.183.69 with SMTP id cf5mr8008914qab.0.1323814403543; Tue, 13 Dec 2011 14:13:23 -0800 (PST) Path: lh20ni19200pbb.0!nntp.google.com!news2.google.com!news4.google.com!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: Wed, 14 Dec 2011 00:15:14 +0200 Organization: Tidorum Ltd Message-ID: <9kq102F8kvU1@mid.individual.net> References: <30143086.6.1323549838421.JavaMail.geo-discussion-forums@vbbfq24> <6df577eb-9c6a-4f82-95e4-817f6ad1ba6e@r6g2000yqr.googlegroups.com> Mime-Version: 1.0 X-Trace: individual.net gGj5tUWqsslB2S0sw3MsNAHpOyy6BfoI8PJa9WlRSfYoORBB9q Cancel-Lock: sha1:Zx2RuroK6Gsv0RfQS1FfGOcQJzY= 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-14T00:15:14+02:00 List-Id: On 11-12-13 17:23 , Ada BRL wrote: > Sorry but I'm beginning to loose the thread... No wonder, the discussion has spread out a bit. Basically Ada has two ways to pass data from one task to another, with synchronization: "rendezvous", in which two tasks interact directly with each other, and "protected objects", in which some tasks puts data into a buffer or queue (the protected object), and other tasks take data out. Both ways use some of the same terminology ("entry", "entry call") for things that are similar but not exactly the same. The discussion has tried to cover both ways, which perhaps explains the confusion. Since you seem familiar with socket communication, perhaps it would be easier for you to use a single-threaded Ada program, where the single thread reads all the sockets. In that case, the Ada side would call the Windows "select" function, http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx, to wait for some data to arrive on some socket. When the "select" call returns, it indicates which socket or sockets have data available, so the Ada program can read and process that data, and then call "select" again to wait for the next data. I think that Dmitry also mentioned this solution in an earlier answer. Note that the "select" function is not the same as the Ada "select statement", but they have a common goal: to wait for events or data from several possible sources, without knowing which source will be first to deliver. Perhaps the socket library that you are using in your Ada code already has an Ada binding to the "select" function. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .