comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: rendez-vous underlying mechanism
Date: Tue, 26 Mar 2002 09:10:49 -0500
Date: 2002-03-26T14:10:50+00:00	[thread overview]
Message-ID: <a7pvha$4su$1@nh.pace.co.uk> (raw)
In-Reply-To: a7pk89$kj4$1@bcarh8ab.ca.nortel.com

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" <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 ?
>
> Thanks
>
>
>
>
> "Bozo" <gri_nob@yahoo.com> 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
> >
> >
>
>





  reply	other threads:[~2002-03-26 14:10 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 [this message]
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
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