From: ogicse!milton!mfeldman@uunet.uu.net (Michael Feldman)
Subject: Re: HELP! HELP! Dynamic InterTask Communication between different Pac
Date: 14 Nov 91 03:13:50 GMT [thread overview]
Message-ID: <1991Nov14.031350.28704@milton.u.washington.edu> (raw)
In article <13NOV199116031506@elroy.uh.edu> cosc143u@elroy.uh.edu (91F9774) wri
tes:
[ stuff deleted ]
>I know this is possible in Ada, but so far, no luck. What is wrong with my
>approach (example code follows). Thanks in advance for any help.
>.
>package t is
> task type taskt is
> entry callt;
> end taskt;
>end package t;
>package body t is
> task type taskt is
> begin
> accept callt;
> taskp.callp;
> end taskt;
>end t;
> .
>package p is
> task type taskp is
> entry callp;
> end taskp;
>end package p;
>package body p is
> task type taskp is
> begin
> accept callp;
> taskt.callt;
> end taskp;
>end p;
>
You're on the right track. You just need to get the compilation order
right. Add to package body (NOT spec) p the line
with t;
and to the package body t the line
with p;
then compile in the following order:
spec of t
spec of p
body of t
body of p
also the entry calls need to be qualified with the package names, e.g.
t.taskt.callt
(or you can use a USE clause to get the same effect, if you don't
mind USEs).
You'll also need a main program that with's both packages, even if it's
a begin-null-end main (you need something to cause the packages to
be elaborated, in order to activate the tasks).
Write back by personal mail if you have more questions. Good luck.
Mike
-------------------------------------------------------------------------------
Michael B. Feldman
Visiting Professor 1991-92 Professor
Dept. of Comp. Sci. and Engrg. Dept. of Elect. Engrg. and Comp. Sci.
University of Washington FR-35 The George Washington University
Seattle, WA 98105 Washington, DC 20052
mfeldman@cs.washington.edu mfeldman@seas.gwu.edu
(206) 632-3794 (voice) (202) 994-5253 (voice)
(206) 543-2969 (fax) (202) 994-5296 (fax)
-------------------------------------------------------------------------------
next reply other threads:[~1991-11-14 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-11-14 3:13 Michael Feldman [this message]
-- strict thread matches above, loose matches on Subject: below --
1991-11-15 17:19 HELP! HELP! Dynamic InterTask Communication between different Pac nuchat!shell!spjerint!jon
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox