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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8af9e3a438ec928a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: process blocking Date: 09 Sep 2004 07:38:05 -0400 Organization: Cuivre, Argent, Or Message-ID: References: <41400af9$1@dnews.tpgi.com.au> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1094729906 72575 212.85.156.195 (9 Sep 2004 11:38:26 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 9 Sep 2004 11:38:26 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: <41400af9$1@dnews.tpgi.com.au> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-OriginalArrivalTime: 09 Sep 2004 11:38:16.0454 (UTC) FILETIME=[7F468A60:01C49661] X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:3534 Date: 2004-09-09T07:38:05-04:00 "P Hull" writes: > 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. -- -- Stephe