Re: protected type interrupts
- From: "REH" <spamjunk@xxxxxxxxxxx>
- Date: 24 Aug 2006 12:16:25 -0700
Adam Beneschan wrote:
REH wrote:
Thanks for the reference. Is your work-around valid? Isn't calling
Relay_Object.Isr a potentially blocking operation, and thus a bad thing
to do in an interrupt?
I don't think it's potentially blocking... Relay_Object.Isr is a
procedure, and as I read 9.5.1, a call to a protected *procedure* is
not a potentially blocking operation unless it's done from the same
protected object. A call on a protected *entry* would be potentially
blocking. [This is from the Ada 95 manual. If this has changed in Ada
0Y, I can't tell because www.adaic.com isn't responding.]
I don't understand. How can a procedure within a protected object
modify data internal to the object in a thread-safe way without the
potentially blocking effect of enforcing mutual exclusion? If one task
is "using" the object, and another calls one of the object's
procedures, would the second task not be blocked until the first one
exits the object?
REH
.
- Follow-Ups:
- Re: protected type interrupts
- From: Jean-Pierre Rosen
- Re: protected type interrupts
- From: Jeffrey R. Carter
- Re: protected type interrupts
- From: Adam Beneschan
- Re: protected type interrupts
- References:
- protected type interrupts
- From: REH
- Re: protected type interrupts
- From: Jean-Pierre Rosen
- Re: protected type interrupts
- From: REH
- Re: protected type interrupts
- From: Adam Beneschan
- protected type interrupts
- Prev by Date: ANN: GtkAda contributions v1.2
- Next by Date: Re: Information On How To Use The Ada Score Compiler For Windows PC
- Previous by thread: Re: protected type interrupts
- Next by thread: Re: protected type interrupts
- Index(es):
Relevant Pages
|