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,5618e4c4489899ac,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-30 19:54:46 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: ma740988@pegasus.cc.ucf.edu (Mark) Newsgroups: comp.lang.ada Subject: implementation approach Date: 30 Jul 2002 19:54:45 -0700 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 132.170.29.137 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1028084085 16844 127.0.0.1 (31 Jul 2002 02:54:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 31 Jul 2002 02:54:45 GMT Xref: archiver1.google.com comp.lang.ada:27504 Date: 2002-07-31T02:54:45+00:00 List-Id: I'm in a quandry here and could certainly use some help. That said, some background information. I've got code spread across two processors. We'll call processors A and B respectively. Of interest is a device I'm communicating with (serial). The code for communicating with said device resides on processor A. While communicating with the device during a 'certain' mode, the communication is as follows: - I send a command. - Device sends an interrupt - I synchronize with interrupt and send said command again -- and so on .. Trouble is. The interrupt gets routed through and FPGA and 'goes' through processor B. On B i've got an interrupt handler .. "pragma Attach_Handler .." that'll check if the interrupt happened. When it does I could perhaps set a flag, then pass the message via a Send_Message routine to processor A and the routine for commanding the device on A will again command device. After 8 months of ADA I'm startign to catch on, however, my ADA is still 'limited'. In any event, I'm thinking a semaphore might might be the most elegant approach or ... I'm open for ideas. If semaphore could someone provide me with an example on how to do this? I suspect I'll need two semaphores on both processors. Once the flag gets passed from processor B to processor A, the routine in A will enter the semaphore command the device, release the flag, etc. Thanks in advance