From: "R. Tim Coslet" <coslett@kaisere.com>
Subject: Protected Objects (Geeenhills & VxWorks)
Date: 2000/02/10
Date: 2000-02-10T00:00:00+00:00 [thread overview]
Message-ID: <38A30F81.F0CAF1E6@kaisere.com> (raw)
We have been having repeated problems where Protected Objects don't seem
to be functioning correctly in the environment we are working with
(Greenhills V1.8.9 w/ VxWorks).
The simplest case I have is the following...
protected body Example_Protected_Object is
entry Send when Available or
I_Am_Tired_Of_Waiting is
begin
-- Do some things here...
-- reset the barrier flags
Available := False;
I_Am_Tired_Of_Waiting := False;
-- reset the waiting flag
Waiting_For_It := False;
end Send;
procedure Signal_Available is
begin
-- set the barrier flag to indicate data has been received
Available := True;
end Signal_Available;
procedure Check_For_Timeout is
begin
-- set the barrier flag to indicate data has not been received
I_Am_Tired_Of_Waiting := Waiting;
-- set the waiting flag
Waiting := True;
end Check_For_Timeout;
end Example_Protected_Object;
The entry (Send) is called from one task, to hold it until data arrives.
The procedure (Available) is called from a task that is triggered by an
interrupt.
The procedure (Check_For_Timeout) is called from the main program loop,
running at a lower priority than the other two tasks.
When everything is working normally, Available is called following the
interrupt processing and the queued call to Send is released from its
barrier. Check_For_Timeout is also periodically called by the main
program and as expected nothing happens.
When I prevent Available from being called however the system locks up.
This is not what I expected. I expected the call to Check_For_Timeout by
the main program to release the queued call to Send from its barrier.
Am I using the protected object correctly, or is something broken in the
Greenhills implementation of protected objects? I strongly suspect
Greenhills as I have read the LRM sections repeatedly and they seem to
say this should work and we were previously forced to convert all
protected object Interrupt Handlers to direct calls to VxWorks services
(bypassing the Ada implementation).
R. Tim Coslet
CosletT@KaiserE.com
next reply other threads:[~2000-02-10 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-10 0:00 R. Tim Coslet [this message]
2000-02-10 0:00 ` Protected Objects (Geeenhills & VxWorks) Tucker Taft
2000-02-10 0:00 ` R. Tim Coslet
2000-02-10 0:00 ` R. Tim Coslet
2000-02-10 0:00 ` DuckE
2000-02-10 0:00 ` R. Tim Coslet
2000-02-10 0:00 ` R. Tim Coslet
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox