TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date:
Mon, 1 Mar 2004 13:06:47 +0000
Reply-To:
George Reynolds <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset="iso-8859-1"
From:
George Reynolds <[log in to unmask]>
Parts/Attachments:
text/plain (39 lines)
How do you unsubscribe?


On Monday 01 March 2004 12:49, you wrote:
> ----- Original Message -----
> From: <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Monday, March 01, 2004 5:14 PM
> Subject: Ada Tasks accessing a protected object
>
>
> Hi,
>
> >Could anybody help me with a tasking problem I am experiencing in ADA?
> >
> >I have a protected object (PO), and when a single task accesses this PO,
>
> then everything is fine.
>
> >As soon as I have more then one task trying to access the PO, the software
>
> hangs as soon as the 2nd task trys to gain access.
>
> >What could cause this to happen?
>
> The most likely thing is that the first task never releases the PO.
> The second task therefore is blocked. This should cause the first task
> to continue, but if it's waiting for the second task to do something,
> ie waiting for a resource blocked by the second task, then you have a
> deadlock.
>
> What code are you using? What compiler? Gnat 13+ handles POs quite well
> in my experience, so if you're using Gnat, it's unlikely that it's a
> compiler problem.
>
> To state the obvious, Judicious use of PUT_LINEs on acquisition and release
> entries of the PO will probably reveal the cause. Of course, a Debugger
> would be better, but isn't neccessary.

ATOM RSS1 RSS2