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,c2dda499a002ec3c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-10 06:40:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newspeer.monmouth.com!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <3CA2A827.11140295@adaworks.com> Subject: Re: rendez-vous underlying mechanism X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 208.191.177.131 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr11.news.prodigy.com 1018445991 ST000 208.191.177.131 (Wed, 10 Apr 2002 09:39:51 EDT) NNTP-Posting-Date: Wed, 10 Apr 2002 09:39:51 EDT Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: SCSYASJGTZYQBQXYQ[OD]_HBWB]^PCPDLXUNNHLHEQR@ETUCCNSKQFCY@TXDX_WHSVB]ZEJLSNY\^J[CUVSA_QLFC^RQHUPH[P[NRWCCMLSNPOD_ESALHUK@TDFUZHBLJ\XGKL^NXA\EVHSP[D_C^B_^JCX^W]CHBAX]POG@SSAZQ\LE[DCNMUPG_VSC@VJM Date: Wed, 10 Apr 2002 13:39:51 GMT Xref: archiver1.google.com comp.lang.ada:22316 Date: 2002-04-10T13:39:51+00:00 List-Id: "Kevin Cline" wrote in message news:ba162549.0204080905.24486c34@posting.google.com... > Richard Riehle wrote in message news:<3CA2A827.11140295@adaworks.com>... > > Kevin Cline wrote: > > > > > "Bozo" wrote in message news:... > > > > 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 ? > > > > > > This depends on the underlying OS. If you are using pthreads, > > > then see the manual entry for pthread_cond_wait. > > > > This approach, of course, does not come close to the capabilities > > already built-in to the Ada tasking model. Ever heard of protected > > types. > > I know that. However, in a hosted environment, the imperfect > mapping between the Ada tasking model and the underlying OS facilities > can catch programmers by surprise. When was this? You say that as if it is the current norm -- and it certainly was in the 1980's -- but surely not still. The compilers I know about that target Un*x or Linux map tasks directly to the underlying OS's threads, not their processes. The old Verdix compiler did that many years ago (i.e., mapped tasks to sprocs). > I was certainly surprised > when I attempted to create a separate task for I/O but found that > all tasks blocked anyway because they were mapped to a single Unix thread. > On that implementation Ada multi-tasking was uselsss for solving > problems routinely handled with Posix threads. Agreed; an undesirable implementation if the option of mapping tasks to Pthreads was not available, but that's my point -- that was a given implementation that I don't believe is not the norm today. --- Patrick Rogers Consulting and Training in: http://www.classwide.com Real-Time/OO Languages progers@classwide.com Hard Deadline Schedulability Analysis (281)648-3165 Software Fault Tolerance