comp.lang.ada
 help / color / mirror / Atom feed
From: "P Hull" <p.hull@msw.com>
Subject: Re: process blocking
Date: Thu, 9 Sep 2004 21:50:28 +1000
Date: 2004-09-09T21:50:28+10:00	[thread overview]
Message-ID: <41404385$1@dnews.tpgi.com.au> (raw)
In-Reply-To: mailman.6.1094729905.390.comp.lang.ada@ada-france.org

> > Hi, I know this is possible, but how does one go about having a process
(p1)
> > siezing control of another process (pMain) such that no other process
(p2,
> > p3, .. pn) is able to access pMain? I am guessing you define one channel
and
> > maintain access to this channel? I have no idea how to implement such
> > blocking.
>
> If you can use an Ada task for your "process", and by "access" you
> mean "rendezvous with", then this is a matter of visibility; make sure
> task pMain is only visible to task p1. Declaring pMain in a private
> child of the package that declares p1 is one way to do this.
>
> However, that is a static solution. If you need to change which tasks
> are able to rendezvous with pMain at run time, you'll need a different
> mechanism.
>
> If you explain more about why you think you need to do this, there is
> probably another way to accomplish it.

Hi thanks for the reply.

Oh i was not looking for a static solution. pMain is visible to all tasks
p1..pn. The first task (i.e. one of p1..pn based upon some timing mechanism)
will rendezvous with pMain and seizes pMain. And once pi has finished
whatever it wants to do with pMain, some other task within p1..pn will then
next rendezvous with pMain and seize it, and once finished .. etc etc

I know this should be simple to implement. Thanks for any help

Peter





  reply	other threads:[~2004-09-09 11:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09  7:49 process blocking P Hull
2004-09-09 11:38 ` Stephen Leake
2004-09-09 11:50   ` P Hull [this message]
2004-09-09 14:51     ` Georg Bauhaus
2004-09-09 18:09     ` Ludovic Brenta
2004-09-10  3:07 ` Steve
replies disabled

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