comp.lang.ada
 help / color / mirror / Atom feed
From: Ole-Hjalmar Kristensen <oleh@vlinux.voxelvision.no>
Subject: Re: rendez-vous underlying mechanism
Date: Wed, 10 Apr 2002 07:49:33 GMT
Date: 2002-04-10T07:49:33+00:00	[thread overview]
Message-ID: <7vr8longc3.fsf@vlinux.voxelvision.no> (raw)
In-Reply-To: ba162549.0204080905.24486c34@posting.google.com

kcline17@hotmail.com (Kevin Cline) writes:

> Richard Riehle <richard@adaworks.com> wrote in message news:<3CA2A827.11140295@adaworks.com>...
> > Kevin Cline wrote:
> > 
> > > "Bozo" <gri_nob@yahoo.com> 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 ?
> > >
> > > 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.  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.

Yes. The really bad thing about this is that your program will compile
and run, but not work as you had expected when you port it to a new
platform where Ada tasks has been impelented differently. 




  reply	other threads:[~2002-04-10  7:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-25 13:48 rendez-vous underlying mechanism Bozo
2002-03-25 20:09 ` Marin David Condic
2002-03-26  1:44 ` Adrian Hoe
2002-03-26  1:16   ` Jeffrey Creem
2002-03-26  2:05   ` Adrian Hoe
2002-03-26  2:16     ` Jeffrey Creem
2002-03-26  6:04   ` Simon Wright
2002-03-26 10:17     ` Adrian Hoe
2002-03-26  9:31       ` tgingold
2002-03-26 10:40       ` David C. Hoos, Sr.
2002-03-27  1:42       ` Adrian Hoe
     [not found]     ` <a8olf7$enj$3@nntp9.atl.mindspring.net>
2002-04-07  6:44       ` Pascal Obry
2002-04-08  7:48       ` Jean-Pierre Rosen
2002-03-26 10:58 ` Bozo
2002-03-26 14:10   ` Marin David Condic
2002-03-26 14:57   ` Kevin Cline
2002-03-28  5:20     ` Richard Riehle
2002-03-28 15:44       ` Marin David Condic
2002-04-08 17:05       ` Kevin Cline
2002-04-10  7:49         ` Ole-Hjalmar Kristensen [this message]
2002-04-10 13:39         ` Pat Rogers
2002-04-10 17:19           ` Kevin Cline
2002-04-10 17:23             ` Pat Rogers
2002-04-11 11:52               ` Ole-Hjalmar Kristensen
2002-04-11 16:01                 ` Darren New
2002-04-10 17:58             ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox