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=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c2dda499a002ec3c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-26 16:08:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!skynet.be!skynet.be!news-x2.support.nl!amsnews01.chello.com!news-hub.cableinet.net!blueyonder!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: rendez-vous underlying mechanism Date: Tue, 26 Mar 2002 09:10:49 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1017151850 5022 136.170.200.133 (26 Mar 2002 14:10:50 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 26 Mar 2002 14:10:50 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:21705 Date: 2002-03-26T14:10:50+00:00 List-Id: Yes, but you'll have to check for the available OS or compiler supplied tools to do the job. Basically, you need a means of making some functions that run as threads. That's usually some kind of OS call. Likewise, you need some kind of semaphore or flag (Two of them) on which the threads will block. (Again, that will likely be an OS call.) When you've got two functions running in parallel and you want to do the equivalent of the rendesvous, they need to flag each other via the semaphores If you have a writer of data and a reader of data, they need to do the following: The writer sets up the data, then trips the flag for the reader saying "Go ahead and read the data". It must then immediately block on a flag that the reader is going to set that indicates "The data has been read". From the reader's perspective, it is going to hang on the flag that says "Its OK for me to read the data now." When it has copied the data (or done whatever it would do in the accept statement in Ada.) it finishes its part by setting the flag indicating "The data has been read" The writer is then allowed to proceed. The specifics are going to depend entirely on what OS calls or compiler utilities you have available. You might find that out from a C newsgroup if you don't already know. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Bozo" wrote in message news:a7pk89$kj4$1@bcarh8ab.ca.nortel.com... > Hi all, > > I'm sorry I wasn't clear enough. > I don't use ADA at the moment but I was a brave ADA programmer once. > I use C at the moment and I have a case where synchronous rendez-vous would > be better that traditional asynchrounous intertask communications. > > Does anyone have an idea how to implement that in C with semaphores for > example ? > > Thanks > > > > > "Bozo" wrote in message > news:a7n9qd$8kf$1@bcarh8ab.ca.nortel.com... > > Hi all, > > > > I'm jus wondering how a rendez-vous is done internally. I'd like to do > > something resembling a rendez-vous in C and that would help me. > > > > Thanks > > > > > >