comp.lang.ada
 help / color / mirror / Atom feed
From: compguy45@gmail.com
Subject: Re: passing messages between the tasks
Date: Tue, 14 Oct 2014 14:08:08 -0700 (PDT)
Date: 2014-10-14T14:08:08-07:00	[thread overview]
Message-ID: <9fa74920-0bb1-49d4-93ac-f781529f0c98@googlegroups.com> (raw)
In-Reply-To: <m1k1sc$v8k$1@dont-email.me>

What i am trying to do is something like this....code from above...

3
  4 procedure SomeProcedure is
  5
  6 task type lamp is
  7    entry reset(id : Integer);
  8 end lamp;
  9
 10 lamps : array (1..6) of lamp;
 11
 12    task body lamp is
 13    begin
 14       Put_Line("Body of task lamp");
 15       accept reset(id : Integer) do
 16         put("inside reset");
 17         put(id);
 18         New_Line;
 19       end reset;
 20       delay 4.0;
 21    put("after accept");
 22    end lamp;
 23
 24 begin
 25    lamps(1).reset(id => 1);
 26    lamps(2).reset(id => 2);
 27 end SomeProcedure; 

I am trying to figure out how to do following....have say main tasks call reset on say lamps(3).reset....
Then lamp(3) would call reset on lamps(2) and lamps(1) and wait....then someone lamps(2) and lamps(1) when they done with reset would somehow let lamp(3) know about it....Is this possible to do...?


  reply	other threads:[~2014-10-14 21:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14  1:17 passing messages between the tasks compguy45
2014-10-14  1:49 ` Adam Beneschan
2014-10-14  1:55   ` compguy45
2014-10-14  2:09   ` compguy45
2014-10-14  2:14     ` Adam Beneschan
2014-10-14  2:15       ` compguy45
2014-10-14  7:36         ` mockturtle
2014-10-14 15:30           ` compguy45
2014-10-14 16:25             ` mockturtle
2014-10-14 20:33             ` Shark8
2014-10-14 19:43   ` Shark8
2014-10-14 20:42     ` Jeffrey Carter
2014-10-14 21:08       ` compguy45 [this message]
2014-10-14 21:58         ` compguy45
2014-10-14 23:03           ` Jeffrey Carter
2014-10-14 22:22         ` Shark8
2014-10-14 23:49         ` Dennis Lee Bieber
2014-10-15  1:07         ` Dennis Lee Bieber
replies disabled

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